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 11:28 AM, Jason wrote:

Is there a way for me to get a list of all classes that an NSBundle
contains? I only see two methods listed on NSBundle that are close to what
I need (principalClass and classNamed:) and both require me to already know
the name of the class I want to load. What I'm trying to do is get a list
of classes inside a bundle (which I may not know the contents of) and print
out the class names of the ones that match a certain criteria.

When NSBundle loads a bundle, it sends out an NSBundleDidLoadNotification, attached to which is a list of the loaded classes (under the NSLoadedClasses key). If you want to get information about the class content of a bundle without having to load it, I'm afraid you'll have to examine the executable yourself.


Douglas Davidson

_______________________________________________

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>)



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.