Re: How to implement an object whose properties are really dictionary entries.
Re: How to implement an object whose properties are really dictionary entries.
- Subject: Re: How to implement an object whose properties are really dictionary entries.
- From: Jens Alfke <email@hidden>
- Date: Wed, 11 Jul 2012 14:23:29 -0700
On Jul 11, 2012, at 1:45 PM, Motti Shneor <email@hidden> wrote:
> I'd like to avoid dynamic auto-generation of methods at runtime. I can't see why this is needed --- ALL my getters and setters will look exactly the same.
It isn't strictly _needed_, but it's the only alternative to creating all the methods at compile time using either copy-paste or a macro like the one Dave DeLong suggested. If you want to access all these properties using native property syntax, instead of "-valueForKey:", then there has to exist a method for each of those properties. They can be created in the source code, or on the fly at runtime (which is the way Core Data does it.)
—Jens
_______________________________________________
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