Re: List of all available classes ?
Re: List of all available classes ?
- Subject: Re: List of all available classes ?
- From: Guy English <email@hidden>
- Date: Tue, 28 Feb 2006 10:28:35 -0500
if ( [myObject isKindOfClass: [NSObject class]] ) { /* blah */ };
On Tuesday, February 28, 2006, at 10:25AM, Martin Wilz <email@hidden> wrote:
>Hi Martin,
>
>thank you for pointing to this post. I'll have to overthink my search
>techniques...
>
>So with the information linked to, I guess I'll have to reformulate my
>question:
>
>How do I get a list of classes that are a subclasses of NSObject (e.g.
>available for sending
>messages to) ?
>
>My interpretation of the linked to posts is it would be o.k. to use the
>objc_class struct and
>evaluate the super pointer until I get to a class with name NSObject or a
>nil super class
>to decide, if a given class is derived from NSObject ?
>
>Are there simpler methods, that work (without messing with the c structures)
>?
>
>Thanks,
>Martin
>
>
>On 28/02/06, Martin Wierschin <email@hidden> wrote:
>>
>> > Does anyone know a way to get an Array of all currently available
>> > classes
>> > linked into the application space at runtime ?
>>
>> You'll want to use the function "objc_getClassList". But just be
>> careful:
>>
>> http://www.cocoabuilder.com/archive/message/cocoa/2002/1/15/71392
>>
>> ~Martin
>>
>>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Cocoa-dev mailing list (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>
>This email sent to email@hidden
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden