• 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: How to use a class, which may not be available
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >How to use a class, which may not be available (From: Stefan Pantke <email@hidden>)
 >Re: How to use a class, which may not be available (From: j o a r <email@hidden>)
 >Re: How to use a class, which may not be available (From: m <email@hidden>)
 >Re: How to use a class, which may not be available (From: Alastair Houghton <email@hidden>)
 >Re: How to use a class, which may not be available (From: m <email@hidden>)
 >Re: How to use a class, which may not be available (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: sscanf problem
  • Next by Date: Re: sscanf problem
  • Previous by thread: Re: How to use a class, which may not be available
  • Next by thread: Re: How to use a class, which may not be available
  • Index(es):
    • Date
    • Thread