Re: App behaves differently when run in Xcode
Re: App behaves differently when run in Xcode
- Subject: Re: App behaves differently when run in Xcode
- From: Victor Tran <email@hidden>
- Date: Fri, 28 Oct 2005 18:16:19 +1000 (EST)
--- Sherm Pendley <email@hidden> wrote:
> On Oct 28, 2005, at 3:49 AM, Victor Tran wrote:
>
> > Hmm ok I'll try using the full path. The logs I'm
> > talking about are the actual outputs of the
> > application. So how do I get the current working
> > directory of the app?
>
> Why do you need that directory? Quite often, it
> won't be writable
> anyway, because your application will be installed
> in /Applications
> and being run by a non-admin user. In the general
> case, even if the
> directory happens to be writable, storing data and
> programs in the
> same place is a terrible idea.
>
> So, now that I've told you that you're holding a gun
> and pointing it
> at your foot, here's the bullet you asked for. ;-)
>
> NSString *appPath = [[NSBundle mainBundle]
> bundlePath];
>
You're right! I didn't think of it that way. I guess
Desktop will have to do for now, since my app is not
very developed (in terms of setting preferences
anyway).
Thanks for the help.
> sherm--
>
> Cocoa programming in Perl:
> http://camelbones.sourceforge.net
> Hire me! My resume: http://www.dot-app.org
>
>
____________________________________________________
Do you Yahoo!?
Listen to over 20 online radio stations and watch the latest music videos on Yahoo! Music.
http://au.launch.yahoo.com
_______________________________________________
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