Re: Getting list of classes inside NSBundle
Re: Getting list of classes inside NSBundle
- Subject: Re: Getting list of classes inside NSBundle
- From: glenn andreas <email@hidden>
- Date: Fri, 19 Oct 2007 17:08:23 -0500
On Oct 19, 2007, at 5:00 PM, Uli Kusterer wrote:
Am 19.10.2007 um 23:51 schrieb glenn andreas:
Not sure if that is as good of an idea - from the docs:
Due to the amount of uncertainty about the environment at the
point that load is invoked, you should avoid using load whenever
possible.
Well, this is mitigated a lot for loadable bundles, though. There,
you're pretty much guaranteed that the app has already been loaded,
you just shouldn't use any other classes in your bundle yet. But
getting your own class object and adding it to an NSMutableArray in
the app itself is hunky-dory.
Which will work fine and dandy up until the point where you decide
that you're going to migrate that plugin class into the app itself
(since you've decided that it is so wonderful that should be part of
the app itself instead of a plugin).
Personally, rather than keeping track of a class list as things are
loaded, I'd just walk the entire class lists as needed (which would
also help to mitigate against forgetting to add your magic
registration into +load).
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures,
fractals, art
_______________________________________________
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