Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting list of classes inside NSBundle




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Getting list of classes inside NSBundle (From: Jason <email@hidden>)
 >Re: Getting list of classes inside NSBundle (From: Douglas Davidson <email@hidden>)
 >Re: Getting list of classes inside NSBundle (From: Jason <email@hidden>)
 >Re: Getting list of classes inside NSBundle (From: Uli Kusterer <email@hidden>)
 >Re: Getting list of classes inside NSBundle (From: glenn andreas <email@hidden>)
 >Re: Getting list of classes inside NSBundle (From: Uli Kusterer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.