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: Dave DeLong <email@hidden>
- Date: Thu, 12 Jul 2012 07:23:20 -0700
Sent from Jane
On 2012-07-12, at 7:05 AM, Keary Suska <email@hidden> wrote:
> The forwardInvocation implementation would be easy.
It would also be slow.
> In theory, all you need to distinguish is the setX vs X pattern, determine the actual key name (really just extracting and formatting when you get a setX method), change the selector of the invocation to the appropriate undefined key method, and invoke it.
If you're going to go to all that trouble to compute the key name, then you should go with dynamic method resolution instead. It'd only be a little bit more work at that point, would be much more flexible, and a lot faster.
Dave
_______________________________________________
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