• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSArray NSDictionary Tree Q.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: [cocoa-dev] newbie question
  • Next by Date: Re: Using NSFileHandle for server socket communication
  • Previous by thread: Problem between Mail and a Bundle
  • Next by thread: Re: NSArray NSDictionary Tree Q.
  • Index(es):
    • Date
    • Thread