Re: Can a subclass of NSDictionary do this?
Re: Can a subclass of NSDictionary do this?
- Subject: Re: Can a subclass of NSDictionary do this?
- From: Marco Scheurer <email@hidden>
- Date: Wed, 23 Jul 2003 19:36:41 +0200
On Wednesday, July 23, 2003, at 06:57 PM, Chris Hanson wrote:
On Wednesday, July 23, 2003, at 02:29 AM, p3consulting wrote:
NSKeyValueCoding is limited in functionality for general use
Not really, it's exceptionally useful for "general use." Just because
it doesn't cover 100% of the features it would be nice to have doesn't
mean it's useless. :)
(WebObject/EOFramework origin ?), for example in doesn't support array
in the path syntax
(e.g. "a.b[1].c")
This would be useful in some cases, though I haven't really felt a
burning need for it in all the Cocoa development I've done. The
scripting extensions to KVC would certainly support the addition of
array access to the key-path parser.
and the takeValue:forKeyPath: doesn't create the
intermediary path items if they don't already exist
(ok this should be a parameter)
This would generally be a bad idea. How would KVC know (a) what types
of intermediate path items to create and (b) how to go about creating
them (i.e. what the designated initializer is etc.)?
And IMHO, using key paths of length > 1 is usually not such a good
idea. Of course it's handy, but it breaks encapsulation. Better to ask
directly valueForKey "c" and let the receiver figure out how to get it.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.