• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What defines if an objective C class is visible outside a bundle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >What defines if an objective C class is visible outside a bundle? (From: Jon Hodgson <email@hidden>)
 >Re: What defines if an objective C class is visible outside a bundle? (From: Jens Alfke <email@hidden>)
 >Re: What defines if an objective C class is visible outside a bundle? (From: Jon Hodgson <email@hidden>)
 >Re: What defines if an objective C class is visible outside a bundle? (From: Jon Hodgson <email@hidden>)

  • Prev by Date: Re: Xcode went crazy over the weekend...
  • Next by Date: Unable to make connection in IB
  • Previous by thread: Re: What defines if an objective C class is visible outside a bundle?
  • Next by thread: incorrect automatic device target change
  • Index(es):
    • Date
    • Thread