Re: Adding an image to a project
Re: Adding an image to a project
- Subject: Re: Adding an image to a project
- From: "B.J. Buchalter" <email@hidden>
- Date: Thu, 15 Jul 2010 18:26:10 -0400
On Jul 15, 2010, at 6:17 PM, Vincenzo Morgante wrote:
> Since
> the plugin still does not work on my system, I'll try to create a new
> project following again the wizard for the development of
> plug-in for OsiriX. After
> all, it works on another system...
If you are creating a plugin (rather than an application), you need to be careful to use the right NSBundle calls to refer to your plug-in's bundle and not the bundle of the Application that loads your plugin. That may be the source of the problem for you.
In particular, if your resource is in your plug-in's bundle and your plugin is loaded by a hosting application, the [NSBundle mainBundle] call refers to the bundle of the hosting application, and not your plugin's bundle.
You want to use [NSBundle bundleForClass: <one of your plugin's classes>] or [NSBundle bundleWithIdentifier:@"your.plugins.bundle.id"]
Hope that helps.
Best regards,
B.J. Buchalter
Metric Halo
http://www.mhlabs.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden