Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / January 2005



Tip: Looking for answers? Try searching our database.

XCode and current working directories

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
stephen@nomail.com - 29 Jan 2005 02:04 GMT
How do you set the current working directory to the
directory from which the application was launched?
When you run an executable from XCode the current
directory is set to the build directory.  However I
cannot figure out how to set the directory to something
predictable when I try to run my program as a standalone
application.

Stephen
Miro Jurisic - 29 Jan 2005 05:09 GMT
> How do you set the current working directory to the
> directory from which the application was launched?
[quoted text clipped - 3 lines]
> predictable when I try to run my program as a standalone
> application.

Don't. The correct solution is to make your application not depend on the
current directory.

What are you doing that depends on the cwd that the app was launched from?

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

stephen@nomail.com - 29 Jan 2005 07:00 GMT
:> How do you set the current working directory to the
:> directory from which the application was launched?
[quoted text clipped - 3 lines]
:> predictable when I try to run my program as a standalone
:> application.

: Don't. The correct solution is to make your application not depend on the
: current directory.

: What are you doing that depends on the cwd that the app was launched from?

: meeroh

I want to access data files associated with the application.
I figured out the the CFBundle stuff and it does what I want.

Stephen
Miro Jurisic - 29 Jan 2005 07:21 GMT
> I want to access data files associated with the application.
> I figured out the the CFBundle stuff and it does what I want.

Yes, your data files should be stored inside your bundle, and CFBundle is how
you should get at them.

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.