Re: Problem opening file
Re: Problem opening file
- Subject: Re: Problem opening file
- From: Scott Ribe <email@hidden>
- Date: Tue, 22 Feb 2011 09:46:27 -0700
On Feb 22, 2011, at 9:14 AM, Sherm Pendley wrote:
>> I imagine I have to deal
>> with application bundle api, but the thing is I can't add any cocoa code to
>> this library, as it needs remain cross-platform.
>
> Does this library allow you to specify the full path to its config
> file, instead of just its name, when you initialize the library? If
> so, you could keep the platform-specific code outside of the library
> itself.
>
> Alternatively, you could use NSBundle methods to find the location of
> your executable, then chdir() to that directory before initializing
> the library.
Also, although I don't know that it really matters other than style & consistency, but next to the executable is not where such a file would normally be put in an app bundle. The "Resources" folder in the bundle is more appropriate--assuming here that you're building a regular bundled app and not just a command-line executable...
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
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