• 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: create subclass in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: create subclass in code


  • Subject: Re: create subclass in code
  • From: Sherm Pendley <email@hidden>
  • Date: Fri, 26 Nov 2004 18:49:08 -0500

On Nov 26, 2004, at 6:24 PM, email@hidden wrote:

Is it possible to create a subclass of another class without actually writting the interface and implementation files?

Yes, but it's much more complicated than in your example. You could conceivably bury all the complex stuff in your own -subclass method, like in your example, but there's no easy pre-written -subclass method.


In a nutshell, you have to define a C structure that contains the class definition, and register it with the Objective-C runtime.

Have a look at:

<http://tinyurl.com/5elgu>
<http://developer.apple.com/documentation/Cocoa/Reference/ ObjCRuntimeRef/ObjCRuntimeRef/function_group_4.html>


sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org

_______________________________________________
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


References: 
 >create subclass in code (From: email@hidden)

  • Prev by Date: create subclass in code
  • Next by Date: Re: Updating my application via Internet
  • Previous by thread: create subclass in code
  • Next by thread: Re: NSDictionary and binding
  • Index(es):
    • Date
    • Thread