Re: Hard Objc-Runtime question: objc_getClassList lies to me...
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.