Re: Saving to application support folder.
Re: Saving to application support folder.
- Subject: Re: Saving to application support folder.
- From: glenn andreas <email@hidden>
- Date: Mon, 8 Oct 2007 15:48:00 -0500
On Oct 8, 2007, at 3:27 PM, Andrew Merenbach wrote:
I use:
[[NSBundle mainBundle] objectForInfoDictionaryKey:
@"CFBundleExecutable"]
This has the advantage over using the name of the application
bundle that if the user renames the app, this value remains
unchanged.
Just out of curiosity, is there a reason not to use Apple's
constant kCFBundleExecutableKey, instead of the string literal
@"CFBundleExecutable"?
as in...
[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)
kCFBundleExecutableKey]
Using kCFBundleExecutableKey requires including <Carbon.h> and
linking Carbon.framework (or at least CoreFoundation), where as the
string constant requires no extra inclusion or linker requirements
(nor the explicit reinterpretation cast).
The constant is less error prone, but requires remembering extra "oh,
yeah, I've got to do this". Six of one, half a dozen of the other...
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build,
mutate, evolve, animate
_______________________________________________
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