[futurebasic] Re: [FB] Document Icons with Leopard

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2008 : Group Archive : Group : All Groups

From: Rich Love <richlove@...>
Date: Sat, 1 Mar 2008 05:08:47 -0600
Robert,

I made the suggested changes.
It works now. Thank You.
The strange thing is that I could not get it to work in FB, even after  
restarting the Finder.
But when I compiled and ran in FBtoC, it worked and created the  
correct icon after restarting the FInder.
Then when I ran it again in FB, it worked also.

Here is the revised program
http://macwise.com/ftp/Settings_Icon_Test.zip
It no longer tries to get the icon from the resource file
It uses an icon file called Settings Icon.icns

Rich



On Mar 1, 2008, at 2:33 AM, Robert Purves wrote:

>
> Rich Love wrote:
>
>> Here is the example program. It asks you to save a settings file.
>> http://macwise.com/ftp/Settings_Icon_Test.zip
>> The Settings icon is defined in the info.plst
>> Look at item 5 in CFBundleDocumentTypes
>> It should use icon 271 from the MacWise.RSRC file.
>>
>> The file that the program creates, should have an icon with the  
>> word "SET" in it.
>> It works on my powerbook G3 running OS X 10.2.8 creating the  
>> correct icon.
>> But in Leopard it creates a blank document icon.
>> I don't have any other OS versions up an running to test so don't  
>> know what version breaks it.
>>
>> NOTE: I don't have any problems with the application icon. Just  
>> docmuent icons.
>
> (1) Your Info.plist CFBundleTypeRole entries are bad. Look in  
> Console.app for warnings
>  NSDocumentController Info.plist warning: The values of  
> CFBundleTypeRole entries must be 'Editor', 'Viewer', 'None', or  
> 'Shell'.
>
>
> (2) Specifying an icns file so
> 	<key>CFBundleTypeIconFile</key>
> 	<string>271</string>
> relies on a file named 271.icns being in the bundled app's Resources  
> folder.
> Ensure that 271.icns is in the source folder at build time (I don't  
> see it anywhere in your download), and ask FBtoC to copy it to  
> Resources:
> #if def _FBtoC
> include resources "271.icns"
> #endif
>
> Robert P.
>
> --
> To unsubscribe, send ANY message to: futurebasic-unsubscribe@...
>