Re: OS X document icon missing

2023-10-18 Thread J. Landman Gay via use-livecode
My app is not in the "Open With..." list. I used "Other" to open the stack with my app. It 
worked but the document icon still did not show up in Finder.


My client says he double-clicks the Recipes stack to open LC (it's the only stack he has.) Once 
I assigned my standalone in Get Info it does work and Finder suggests it (and only it) when I 
choose "Open with...", but the document icon is still missing. Blech.


What I learned today: If your stack has a custom extension, LC will open it and you can do some 
basic things like navigation, but nothing else. Keyboard shortcuts don't work and the message 
box does not see the stack at all. Even if I do something non-stack-related ("put the 
fontnames") there is no response. The message box is totally broken. Double-clicking a control 
does not open the property inspector. Right-clicking with the Edit tool does not show a menu. 
When I changed the extension back to ".livecode" and restarted LC all works normally. Tested in 
9.6.9 and LC 9.6.10.


Double blech.

On 10/18/23 3:59 PM, Paul Dupuis via use-livecode wrote:
Yes, that look right. The file extension is .rbox and the file type is 'rbox' for 'Recipe Box 
Files'


I wonder since it only READS .rbox files and does not create them, if you need to context-click 
(CTRL-CLICK) on a .rbox file and select "Open With.." to see if your app (an reader of .rbox 
files) is in the list and open one to get macOS to associate viewing .rbox files with your App, 
since it does not actually create .rbox files?



On 10/18/2023 3:54 PM, J. Landman Gay via use-livecode wrote:

On 10/18/23 10:35 AM, Paul Dupuis via use-livecode wrote:
If you have identified the document extension in the Standalone setting for macOS and set an 
ics file of icons (or the appropriate sizes required by Apple) than documents created by 
that app should display the icon.


No go. Here is the relevant part of the plist:

CFBundleDocumentTypes

    
    CFBundleTypeExtensions
    
.rbox
    
    CFBundleTypeIconFile
    StandaloneDoc.icns
    CFBundleTypeName
Recipe Box Files
    CFBundleTypeOSTypes
    
rbox
    
    CFBundleTypeRole
    Editor
    



The app does not create new files, it just opens the existing stack, originally a LC file. I 
tried a "save as..." but that didn't work either. Is there a way to set the signature on an 
existing file? I did try and the stack wouldn't open, presumably it's corrupted.





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: OS X document icon missing

2023-10-18 Thread Paul Dupuis via use-livecode
Yes, that look right. The file extension is .rbox and the file type is 
'rbox' for 'Recipe Box Files'


I wonder since it only READS .rbox files and does not create them, if 
you need to context-click (CTRL-CLICK) on a .rbox file and select "Open 
With.." to see if your app (an reader of .rbox files) is in the list and 
open one to get macOS to associate viewing .rbox files with your App, 
since it does not actually create .rbox files?



On 10/18/2023 3:54 PM, J. Landman Gay via use-livecode wrote:

On 10/18/23 10:35 AM, Paul Dupuis via use-livecode wrote:
If you have identified the document extension in the Standalone 
setting for macOS and set an ics file of icons (or the appropriate 
sizes required by Apple) than documents created by that app should 
display the icon.


No go. Here is the relevant part of the plist:

CFBundleDocumentTypes

    
    CFBundleTypeExtensions
    
.rbox
    
    CFBundleTypeIconFile
    StandaloneDoc.icns
    CFBundleTypeName
Recipe Box Files
    CFBundleTypeOSTypes
    
rbox
    
    CFBundleTypeRole
    Editor
    



The app does not create new files, it just opens the existing stack, 
originally a LC file. I tried a "save as..." but that didn't work 
either. Is there a way to set the signature on an existing file? I did 
try and the stack wouldn't open, presumably it's corrupted.





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: OS X document icon missing

2023-10-18 Thread J. Landman Gay via use-livecode

On 10/18/23 10:35 AM, Paul Dupuis via use-livecode wrote:
If you have identified the document extension in the Standalone setting for macOS and set an 
ics file of icons (or the appropriate sizes required by Apple) than documents created by that 
app should display the icon.


No go. Here is the relevant part of the plist:

CFBundleDocumentTypes


CFBundleTypeExtensions

.rbox

CFBundleTypeIconFile
StandaloneDoc.icns
CFBundleTypeName
Recipe Box Files
CFBundleTypeOSTypes

rbox

CFBundleTypeRole
Editor




The app does not create new files, it just opens the existing stack, originally a LC file. I 
tried a "save as..." but that didn't work either. Is there a way to set the signature on an 
existing file? I did try and the stack wouldn't open, presumably it's corrupted.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: OS X document icon missing

2023-10-18 Thread J. Landman Gay via use-livecode
You may have identified the problem. The original HC stack was ported to  
LC and the client used the free OSS version of LC to access it. Sonoma, of 
course, broke that. This is the recipe stack that I posted here, with 
permission, 2 years ago. He's not a developer and didn't want to pay a 
subscription for the single stack he uses daily. He's been collecting 
recipes for 30 years.


So I made him a quick splash app that would let him access the stack. Since 
the original was created and opened with LC I think changing the extension 
isn't working. I've been looking up ways to clear the icon cache. I'll try 
a few things.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 18, 2023 10:37:56 AM Paul Dupuis via use-livecode 
 wrote:





I don't think this is related to the problem (above) you have. If you
have identified the document extension in the Standalone setting for
macOS and set an ics file of icons (or the appropriate sizes required by
Apple) than documents created by that app should display the icon. I'd
double check that the Docunmet extension and Document Type (if you're
using Types) in the setting match what the file is actually using. I've
had an extra character (sometime a space which is hard to see) in the
past that took me a bit to figure it out.

Unrelated, if you ever need more than one document type, below is some
code I run 'on standaloneSaved' to modify the plist to add additional
document types and icon sets to my macOS app.

put tMac64BuildFolder&".app/Contents/Info.plist" into
tSrcFile -- overwrite original
--
if there is a file tSrcFile then
  put revXMLCreateTreeFromFile(tSrcFile,true,true,false) into tTreeID
  if tTreeID begins with "xmlerr" then
answer error "Error reading XML plist file for updating
document types during build."&""
  else
-- list of document types ,,
put "HyperRESEARCH Study,StandaloneDoc.icns,hs2,HRs2" into
tDocTypes
put "HyperRESEARCH Tools,StandaloneTool.icns,rwtl,RWTL"
after tDocTypes
put "HyperRESEARCH Study Package,StandalonePackage.icns,hsz,HSZ
" after tDocTypes
put "HyperRESEARCH Study
Package,StandalonePackage.icns,hs4z,HS4Z" after tDocTypes
-- XML template
put
""&"CFBundleTypeExtensions"&""&"[[tExtension]]"&""
into tXMLTemplate
put
"CFBundleTypeIconFile"&"[[tIconFile]]"&"CFBundleTypeName"
after tXMLTemplate
put
"[[tDocName]]"&"CFBundleTypeOSTypes"&""&"[[tTypeCode]]"
after tXMLTemplate
put
""&"CFBundleTypeRole"&"Editor"&""
after tXMLTemplate
-- add document types under parent  at end
repeat for each line tDocType in tDocTypes
  put item 1 of tDocType into tDocName
  put item 2 of tDocType into tIconFile
  put item 3 of tDocType into tExtension
  put item 4 of tDocType into tTypeCode
  put merge(tXMLTemplate) into tNodeContents
  revXMLAppend tTreeID, "/plist/dict/array",tNodeContents
end repeat
-- output updated plist
get empty -- clear 'it' for any possible error from revXMLText
that places the error in 'it'
put revXMLText(tTreeID,,true) into tXMLText
if it is not empty then
  answer error "Error writing updated XML plist
file."&""
end if
put uniDecode(uniEncode(tXMLText),"UTF8") into URL
("file:")
  end if
end if


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: OS X document icon missing

2023-10-18 Thread Paul Dupuis via use-livecode

On 10/17/2023 8:11 PM, J. Landman Gay via use-livecode wrote:
How do I force Finder to show a custom document icon? I've created 
.icns files for both the app and its documents. I entered a custom 
extension in standalone settings. In a built standalone the app icon 
appears normally but an associated stack document has only a generic 
blank icon.


I used Get Info to set the document stacks to always open with my app 
(and it does) but the icon still does not appear. The plist does 
contain the correct icon info and both .icns files are present in the 
app's Contents/Resources/ folder.


It looks like a Finder problem but relaunching Finder didn't fix it. 
Ideas?


LC 9.6.10.


I don't think this is related to the problem (above) you have. If you 
have identified the document extension in the Standalone setting for 
macOS and set an ics file of icons (or the appropriate sizes required by 
Apple) than documents created by that app should display the icon. I'd 
double check that the Docunmet extension and Document Type (if you're 
using Types) in the setting match what the file is actually using. I've 
had an extra character (sometime a space which is hard to see) in the 
past that took me a bit to figure it out.


Unrelated, if you ever need more than one document type, below is some 
code I run 'on standaloneSaved' to modify the plist to add additional 
document types and icon sets to my macOS app.


    put tMac64BuildFolder&".app/Contents/Info.plist" into 
tSrcFile -- overwrite original

    --
    if there is a file tSrcFile then
  put revXMLCreateTreeFromFile(tSrcFile,true,true,false) into tTreeID
  if tTreeID begins with "xmlerr" then
    answer error "Error reading XML plist file for updating 
document types during build."&""

  else
    -- list of document types ,,code>
    put "HyperRESEARCH Study,StandaloneDoc.icns,hs2,HRs2" into 
tDocTypes
    put "HyperRESEARCH Tools,StandaloneTool.icns,rwtl,RWTL" 
after tDocTypes
    put "HyperRESEARCH Study Package,StandalonePackage.icns,hsz,HSZ 
" after tDocTypes
    put "HyperRESEARCH Study 
Package,StandalonePackage.icns,hs4z,HS4Z" after tDocTypes

    -- XML template
    put 
""&"CFBundleTypeExtensions"&""&"[[tExtension]]"&"" 
into tXMLTemplate
    put 
"CFBundleTypeIconFile"&"[[tIconFile]]"&"CFBundleTypeName" 
after tXMLTemplate
    put 
"[[tDocName]]"&"CFBundleTypeOSTypes"&""&"[[tTypeCode]]" 
after tXMLTemplate
    put 
""&"CFBundleTypeRole"&"Editor"&"" 
after tXMLTemplate

    -- add document types under parent  at end
    repeat for each line tDocType in tDocTypes
  put item 1 of tDocType into tDocName
  put item 2 of tDocType into tIconFile
  put item 3 of tDocType into tExtension
  put item 4 of tDocType into tTypeCode
  put merge(tXMLTemplate) into tNodeContents
  revXMLAppend tTreeID, "/plist/dict/array",tNodeContents
    end repeat
    -- output updated plist
    get empty -- clear 'it' for any possible error from revXMLText 
that places the error in 'it'

    put revXMLText(tTreeID,,true) into tXMLText
    if it is not empty then
  answer error "Error writing updated XML plist 
file."&""

    end if
    put uniDecode(uniEncode(tXMLText),"UTF8") into URL 
("file:")

  end if
    end if


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Universal buttons: bugs or feature

2023-10-18 Thread Mark Smith via use-livecode
Thanks Ralf.

> On 18 Oct 2023, at 3:02 pm, Ralf Bitter  wrote:
> 
> These issues are fixed in the latest release version 1.4.0.
> 
> 
> Ralf
> 
> 
> 
> On 15.10.2023 21:23, Mark Smith via use-livecode wrote:
>> Hello all,
>> Recently I decided to try out a number of different button styles to see 
>> which ones I liked best, and I ran across some odd behaviour with 
>> “Universal” buttons. First, there does not appear to be any style difference 
>> between an enabled universal button and a disabled one. With all other 
>> button styles there is a noticeable difference between the enabled and 
>> disabled versions. More importantly (perhaps) with all other button types if 
>> you depress the mouse over the button then move the mouse off the button and 
>> release it it does not fire the button. With universal buttons if you move a 
>> depressed mouse off the button and then release it the button fires. And 
>> this behaviour does not appear to conform to Apple’s user interface 
>> guidelines "The mousedown event is fired at an Element when a pointing 
>> device button is pressed while the pointer is inside the element.”
>> Are these differences in the Universal button deliberate features or bugs? 
>> If features, why so?
>> Thanks
>> Mark


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Universal buttons: bugs or feature

2023-10-18 Thread Ralf Bitter via use-livecode

These issues are fixed in the latest release version 1.4.0.


Ralf



On 15.10.2023 21:23, Mark Smith via use-livecode wrote:

Hello all,

Recently I decided to try out a number of different button styles to see which ones 
I liked best, and I ran across some odd behaviour with “Universal” buttons. First, 
there does not appear to be any style difference between an enabled universal button 
and a disabled one. With all other button styles there is a noticeable difference 
between the enabled and disabled versions. More importantly (perhaps) with all other 
button types if you depress the mouse over the button then move the mouse off the 
button and release it it does not fire the button. With universal buttons if you 
move a depressed mouse off the button and then release it the button fires. And this 
behaviour does not appear to conform to Apple’s user interface guidelines "The 
mousedown event is fired at an Element when a pointing device button is pressed 
while the pointer is inside the element.”

Are these differences in the Universal button deliberate features or bugs? If 
features, why so?

Thanks
Mark



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode