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: Chris Hanson <email@hidden>
- Date: Tue, 22 Jul 2003 20:30:10 -0500
On Tuesday, July 22, 2003, at 05:36 PM, James Quick wrote:
I was implementing a subclass of NSObject which contained an
NSMutableDictionary.
The purpose is to support a storage container for nested
NSDictionaries to allow me to
search by keys having internal structure.
You mean like key-value coding?
Look at the documentation on key-value coding, and note that
dictionaries support KVC out of the box. You can say
id x = [myDictionary valueForKeyPath:@"a.b.c"];
and it will do the right thing to traverse the key path.
Key-value coding is one of the core skills you need to master to get
fast with Cocoa. Once you get it, you'll wonder how you ever lived
without it.
-- Chris
PS - From reading your posts, I'm getting the impression that you're
doing a large amount of up-front analysis, design and specification
work before actually writing any code. Check out
http://c2.com/cgi/wiki?BigDesignUpFront for information on some
alternative ways to develop software that can work *very* well,
particularly with dynamic languages like Objective-C. I apologize if
I'm misinterpreting your posts.
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
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.