Re: Plugins work in PB, but not in standalone
Re: Plugins work in PB, but not in standalone
- Subject: Re: Plugins work in PB, but not in standalone
- From: "M. Uli Kusterer" <email@hidden>
- Date: Thu, 30 Oct 2003 14:06:04 +0100
At 7:02 Uhr -0700 29.10.2003, Chaz McGarvey wrote:
Something similar happened to me, only they weren't plugins they
were just images in the same directory as the executable. I thought
that I could just get the images using a relative path (just the
file name), but like you said, it only worked when the app was
launched by Project Builder. Obviously I wouldn't have delivered
the app like this, but it would have been convenient for testing
purposes to do it like this. I still don't know why it works like
this.
The reason is that PB sets up the "current directory" (what you
change using "cd" in the Terminal, for example) different than Finder
does. So, either use the appropriate Unix API (chdir(), or some name
like that) to set up the current working directory at application
launch time, or use absolute paths.
I'd suggest the latter, since it insulates you from some Unix code
you may later decide to incorporate into your app, which may change
the directory again. Use NSBundle methods to get the path to your
application or a folder inside its bundle.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.