• 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: Daniel Child <email@hidden>
  • Date: Thu, 04 Oct 2007 10:13:41 -0400

From your link, I can see that in theory, at least, that class creation could be done, though it looks very involved. I didn't see how you would do methods, though. I think for now I will stick to a prototype with built-in classes, and will consider this issue again when I am less of a novice.

Thanks for the link.

On Sep 21, 2007, at 5:32 PM, Scott Thompson wrote:


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


  • Follow-Ups:
    • Re: creating classes on the fly ??
      • From: Karsten <email@hidden>
  • Prev by Date: Re: Z_OPT field in coredata sqlite database. What it is for?
  • Next by Date: Re: Binding (KVC/KVO) for C struct datatypes
  • Previous by thread: Re: creating classes on the fly ??
  • Next by thread: Re: creating classes on the fly ??
  • Index(es):
    • Date
    • Thread