Re: What defines if an objective C class is visible outside a bundle?
Re: What defines if an objective C class is visible outside a bundle?
- Subject: Re: What defines if an objective C class is visible outside a bundle?
- From: Jon Hodgson <email@hidden>
- Date: Wed, 10 Oct 2012 00:37:00 +0100
> Things to check:
> 1. What does NSClassFromString( classname ) return?
> 2. What does [NSBundle bundleForClass: NSClassFromString( classname )]?
> 3. Are the answers to #1 and #2 different before and after the -[NSBundle load] call?
Thanks, this has certainly shown something, but left me rather confused.
The test host code now reads
Class viewClassCheck = NSClassFromString(viewClassName);
NSBundle* viewBundleCheck = [NSBundle bundleForClass:viewClassCheck];
NSBundle* viewBundle = [NSBundle bundleWithPath: [unescapedPath autorelease]];
BOOL loaded = [viewBundle load];
Class viewClass = [viewBundle classNamed: viewClassName];
Ok, now in the case of a GOOD plugin (the Juce demo plugin)
viewBundle and viewBundleCheck are identical, as are viewClass and
viewClassCheck, all good.
However in the case of my plugin
viewBundle and viewBundleCheck have different values, but both
NSBundles they point to have the same correct path, and viewClass
comes out null.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden