Re: Bundles work differently depending on application launch path?
Re: Bundles work differently depending on application launch path?
- Subject: Re: Bundles work differently depending on application launch path?
- From: Douglas Davidson <email@hidden>
- Date: Fri, 16 Jan 2004 09:49:22 -0800
On Jan 16, 2004, at 6:07 AM, Stuart Halloway wrote:
[NSBundle mainBundle] works to load classes from the mainBundle if you
launch a console application from the current directory. However, if
you launch from some other directory, specifying a relative path to
the application, you can no longer use [NSBundle mainBundle] to load
classes.
NSBundle is not guaranteed to be able to locate the main bundle unless
the process is launched with an absolute path. It makes every attempt
to do so, but under Unix there is no entirely reliable method of
locating the current executable.
Douglas Davidson
_______________________________________________
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.