Re: how to set Document type and its icon programatically
Re: how to set Document type and its icon programatically
- Subject: Re: how to set Document type and its icon programatically
- From: Jean-Daniel Dupas <email@hidden>
- Date: Sat, 20 Sep 2008 10:39:32 +0200
Le 19 sept. 08 à 11:22, Nick Rogers a écrit :
Hi,
My cocoa app is not a document based app, but saves a binary file to
the disk.
I can set this file's name and extension and icon by going to the
Target properties and adding a new document type there.
It was working fine and the resulting saved file was given the
required icon.
But then I had to embed my app into another app directory, since
then its not working (no icon is associated now).
The directory structure is now:
myOuterApp/Contents/MacOS/myInnerApp.app
So the inner app's saved file now doesn't display the required icon.
Will this problem be resolved if I set the icon programatically?
How to go about this?
Thanks,
Nick
Look like LaunchServices does not find you application and does not
register it.
You may try to register it manually at first launch in you outer app
using: LSRegisterURL((CFURLRef)myInnerAppNSUrl, false);
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden