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: "Alastair J.Houghton" <email@hidden>
- Date: Wed, 29 Oct 2003 15:06:45 +0000
On Wednesday, October 29, 2003, at 02:02 pm, Chaz McGarvey wrote:
On Oct 29, 2003, at 6:33 AM, Kevin Wojniak wrote:
I've NSLog-ed it and when I run it as a standalone app, it finds the
plugins that I want to use in the built-in plugins path, but when I
go and call [plugin principleClass] that returns null, but when I run
it from PB it returns the plugin class and works fine. So I know it's
not a problem with the file path stuff since it does fine the >> plugins.
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.
I think you might find the results of
NSLog(@"%@", [[NSFileManager defaultManager] currentDirectoryPath]);
interesting. Project Builder runs applications in the directory
containing the .app bundle, whereas Finder runs them in the root
directory.
Any relative paths used in your program (i.e. any path that doesn't
start with a '/') will therefore be different depending on whether
you're in Project Builder or not.
Kind regards,
Alastair.
_______________________________________________
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.