• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to set Document type and its icon programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >how to set Document type and its icon programatically (From: Nick Rogers <email@hidden>)

  • Prev by Date: Re: Core Data adding new instance - creating relationship to existing instance
  • Next by Date: Re: Constant NSArray Count
  • Previous by thread: how to set Document type and its icon programatically
  • Next by thread: Constant NSArray Count
  • Index(es):
    • Date
    • Thread