NSArray NSDictionary Tree Q.
NSArray NSDictionary Tree Q.
- Subject: NSArray NSDictionary Tree Q.
- From: Ian McGregor <email@hidden>
- Date: Sat, 13 Dec 2003 10:01:54 -0800
I have an immutable NSArray containing a tree-like data structure.
NSArray *rootItems
- NSDictionary item
- NSDictionary item
- NSDictionary item
each NSDictionary item contains an NSArray *children, which can
contains even more NSDictionary *item objects.
Basically a tree using NSArray and NSDictionary
My model requires these objects to be stored in an immutable fashion,
but I make a mutable copy when I am altering the data, no dramas or
probs there.
The problem I am having, is finding an easier method the traverse the
"nodes" or NSDictionary *item's to change their values.
For example, if am currently using unique id's for the group nodes, and
another set of unique id's for the object nodes. I have had some
success using various recursive methods to locate the nodes I wish to
change, but actually changing the node is confusing me.
Any suggestions?
_______________________________________________
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.