• 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:02:21 -0400

Sorry, I missed this email as it went to an unexpected folder.

You suggest that creating a class on the fly can be done. Since the set of classes would be infinitely variable, but in each individual case, it could be determined by interpreting data that is read in, or a description file format I plan to use, then creating classes on the fly (if reasonably trouble-free) would be desirable in my case.

Maybe just for starters, are there methods like "create new class", "add instance variable of type X", etc. I would be really surprised, but it could be useful to me. Thanks.

On Sep 26, 2007, at 2:27 PM, Bill Bumgarner wrote:

HOWEVER, getting back to the original posters question, I don't think that using either Ruby or Python to gain dynamic class generation is really going to be that terribly useful. From my rather ignorant position of only casually following this thread, I'm not sure that dynamic class generation is an appropriate solution. It could be done, but I don't see an advantage over creating a set of classes that effectively model whatever it is you are trying to model. That can be quite dynamic and creating generic, dynamic, containers can vastly simplify lots of things (archival, for example). This is exactly what CoreData does with NSManagedObject and entities -- you don't need to subclass NSManagedObject to store a particular entity.

_______________________________________________

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


  • Prev by Date: Z_OPT field in coredata sqlite database. What it is for?
  • Next by Date: Re: Z_OPT field in coredata sqlite database. What it is for?
  • Previous by thread: Re: Z_OPT field in coredata sqlite database. What it is for?
  • Next by thread: Re: creating classes on the fly ??
  • Index(es):
    • Date
    • Thread