On Nov 10, 2009, at 4:59 AM, Motti Shneor wrote:

Thanks guys, but you may have not read all my message ---

The [NSBundle bundleForClass:[self class]];

is unusable for me, because I have many plugins that build from the same code, and export the same class (of course --- the same class name).

Obj-C has no name-spaces, and so, If you load 2 such plugins, and use the [NSBundle bundleForClass:[self class]] in each of them independently --- you'll get erroneous answers! both of them will return the same bundle although they come from different bundles.

This is hardly a system "bug" because there are no namespaces, and for the same class name there is only one bundle.

As others have said, don't do this. However, to answer your question, the other way to locate your bundle is via bundleWithIdentifier:.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to