• 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: creating classes on the fly ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating classes on the fly ??


  • Subject: Re: creating classes on the fly ??
  • From: Scott Thompson <email@hidden>
  • Date: Fri, 21 Sep 2007 16:32:41 -0500


On Sep 21, 2007, at 4:23 PM, Daniel Child wrote:

*** Is it possible to define the details of a class dynamically?

For example, let's say I use the generic parser to parse lexicon flat files having different data structures. Is there any way in Cocoa to create the class and describe the type and number of instance variables dynamically?


Yes. That's how tools like RubyCocoa and PyObjC can interact with Objective-C code.


see

http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html

There are two things to note, however. First the mechanism could change between releases of the OS. In particular, there is evidence to suggest that it will change somewhat in Leopard (though I suspect it will become easier to do in Leopard than it is in Tiger).

Scott

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >creating classes on the fly ?? (From: Daniel Child <email@hidden>)

  • Prev by Date: creating classes on the fly ??
  • Next by Date: Re: User Installed Resouces (Admin Access)
  • Previous by thread: creating classes on the fly ??
  • Next by thread: Re: creating classes on the fly ??
  • Index(es):
    • Date
    • Thread