OS X document icon missing

J. Landman Gay jacque at hyperactivesw.com
Wed Oct 18 13:11:03 EDT 2023


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 | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 18, 2023 10:37:56 AM Paul Dupuis via use-livecode 
<use-livecode at lists.runrev.com> 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&tAppName&".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 "<p>Error reading XML plist file for updating
> document types during build.</p><p>"&tTreeID&"</p>"
>       else
>         -- list of document types <name>,<icon file><extension>,<type
> code><cr>
>         put "HyperRESEARCH Study,StandaloneDoc.icns,hs2,HRs2"&cr into
> tDocTypes
>         put "HyperRESEARCH Tools,StandaloneTool.icns,rwtl,RWTL"&cr
> after tDocTypes
>         put "HyperRESEARCH Study Package,StandalonePackage.icns,hsz,HSZ
> "&cr after tDocTypes
>         put "HyperRESEARCH Study
> Package,StandalonePackage.icns,hs4z,HS4Z" after tDocTypes
>         -- XML template
>         put
> "<dict>"&cr&"<key>CFBundleTypeExtensions</key>"&cr&"<array>"&cr&"<string>[[tExtension]]</string>"&cr&"</array>"&cr
> into tXMLTemplate
>         put
> "<key>CFBundleTypeIconFile</key>"&cr&"<string>[[tIconFile]]</string>"&cr&"<key>CFBundleTypeName</key>"&cr
> after tXMLTemplate
>         put
> "<string>[[tDocName]]</string>"&cr&"<key>CFBundleTypeOSTypes</key>"&cr&"<array>"&cr&"<string>[[tTypeCode]]</string>"&cr
> after tXMLTemplate
>         put
> "</array>"&cr&"<key>CFBundleTypeRole</key>"&cr&"<string>Editor</string>"&cr&"</dict>"&cr
> after tXMLTemplate
>         -- add document types under parent <plist><dict><array> 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 "<p>Error writing updated XML plist
> file.</p><p>"&it&"</p>"
>         end if
>         put uniDecode(uniEncode(tXMLText),"UTF8") into URL
> ("file:"&tSrcFile)
>       end if
>     end if
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list