Re: Getting an application's creator code
Re: Getting an application's creator code
- Subject: Re: Getting an application's creator code
- From: Rosyna <email@hidden>
- Date: Wed, 3 Jul 2002 13:23:34 -0700
Ack, at 7/3/02, Ondra Cada said:
On Wednesday, July 3, 2002, at 04:38 , Philippe Martin wrote:
However, when the application is a bundle, these attributes don't
have the NSFileHFSCreatorCode. I guess I could get the
CFBundleSignature from its info.plist file, but I wonder if there's
a more direct way that I miss.
Just use NSBundle (created by bundleWithPath:), and check its
infoDictionary. It makes actually for the very same algorithm, but
using simpler and much more portable code.
Actually, this would not be recommended. It seems that the info.plist
file is *completely* ignored for the creator code of bundles. The
PkgInfo file is the one that contains the real info. And If I were
you, I'd use LaunchServices to get the creator code/file type ;) (It
handles bundles properly)
Incidentally, what you need the creator code for? Creator codes are
pretty obsoleted -- the Cocoa standard is the *bundle identifier*
without any clumsy 4-char-limitations. You can get it through
bundleIdentifier message sent to the bundle.
However, flat documents don't have bundleIdentifiers. Especially
documents like HyperCard documents. And do we remember how iDVD took
over the opening of all .prefPane files that didn't have a creator
code? ;)
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
---
Please include any previous correspondence in replies, it helps me
remember what we were talking about. Thanks.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.