Re: How to use a class, which may not be available
Re: How to use a class, which may not be available
- Subject: Re: How to use a class, which may not be available
- From: m <email@hidden>
- Date: Fri, 30 Jan 2004 14:25:49 -0600
On Jan 30, 2004, at 1:03 PM, Alastair Houghton wrote:
Thank you, but your FAQ only covers part of solution and doesn't cover
the situation where you may have subclassed an unavailable class.
Well it seems a bit hacky, but you try something like
@interface MyClass : NSObject
...
@end
then
Class fooClass = objc_lookUpClass ("Foo");
Class myClass = [MyClass class];
if (fooClass)
myClass->super_class = fooClass;
so that MyClass either ends-up as a subclass of NSObject or of "Foo",
depending on whether or not "Foo" can be found.
Interesting... just might work. In any case I found a way to avoid my
troublesome subclass, so I was able to avoid the problem altogether.
Regards,
_murat
_______________________________________________
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.