On Jul 27, 2006, at 6:50 AM, <email@hidden>
I use the method currentDirectoryPath to get the current location
of my app.
That method doesn't return the location of your app. It returns (as
its name implies) the current working directory, which is not the
When I run the application from X Code itself i.e a build and go the
currentDirectoryPath returns the correct path say for e.g
For the same application when i go to the directory
/Users/amrit//MyApplication/build/Debug and click on the application
the method currentDirectoryPath returns " / " .The same is the
I try to launch the application from any other directory.
Why is it so?
The current working directory varies according to how your app is
launched. In addition to the above, you could open a Terminal window,
use 'cd' to change the current directory, and 'open' to open your app.
How do I get the actual current working directory?
You *are* getting the correct current working directory - that's just
not what you expected it to be. :-)
If what you want is the path to your app, you can use NSBundle methods:
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden