Re: Finding the executable path in a foundation tool.
Re: Finding the executable path in a foundation tool.
- Subject: Re: Finding the executable path in a foundation tool.
- From: Douglas Davidson <email@hidden>
- Date: Tue, 8 Jul 2003 13:40:42 -0700
On Tuesday, July 8, 2003, at 12:50 PM, James Quick wrote:
For a Cocoa application
[[NSBundle mainBundle] executablePath];
will return to path to the currently running executable.
Since there is no bundle for a foundation tool, what's the recommended
approach.
A tool isn't bundled, but there is still an [NSBundle mainBundle]. A
synthetic one is created so that there will always be a main bundle.
The only exception would be if something went quite wrong, and e.g.
NSBundle could not locate the 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.