• 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: Hard Objc-Runtime question: objc_getClassList lies to me...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hard Objc-Runtime question: objc_getClassList lies to me...


  • Subject: Re: Hard Objc-Runtime question: objc_getClassList lies to me...
  • From: Martin Häcker <email@hidden>
  • Date: Thu, 24 Jul 2003 19:06:42 +0200

Uuups I switche the imports.

Instead of
#import "DWTTestCaseTest.h

it should have been
#import "DWTClassListerTest.h"

--- snip ---
#import "DWTTestCaseTest.h"
#import "DWTClassLister.h"
#include <objc/objc-runtime.h>

int main(int argc, char **argv)
{
id pool = [NSAutoreleasePool new];

// This does not list "DWTClassListerTest"
// (I think that is because it's not called anywhere)
NSLog(@"%@", [[DWTClassLister new] allClasses]);

// But this works perfectly
Class classListerTest = objc_lookUpClass("DWTClassListerTest");
printf("lookUp returned: '%s'\n", classListerTest->name);

// now this one does does list the class in question
NSLog(@"%@", [[DWTClassLister new] allClasses]);

[pool release];
return 0;
}
--- snap ---

--
dont.wanna.tell
[ot]coder - hehe
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >How to get a list of all classes known to the runtime (From: Martin Häcker <email@hidden>)
 >Hard Objc-Runtime question: objc_getClassList lies to me... (From: Martin Häcker <email@hidden>)

  • Prev by Date: Simple NSAttributedString question
  • Next by Date: Re: Design for Cocoa (was Re: Can a subclass of NSDictionary do this?)
  • Previous by thread: Hard Objc-Runtime question: objc_getClassList lies to me...
  • Next by thread: Re: Hard Objc-Runtime question: objc_getClassList lies to me...
  • Index(es):
    • Date
    • Thread