• 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
Re: Re: Getting an NSOutlineView Item's parent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Getting an NSOutlineView Item's parent


  • Subject: Re: Re: Getting an NSOutlineView Item's parent
  • From: Perrog <email@hidden>
  • Date: Fri, 20 Oct 2006 00:21:43 +0200

2006/10/18, Scott Stevenson <email@hidden>:

It's sounds like you're just using Foundation classes in the view at
the moment (dictionaries, arrays, strings), but it would probably be
easier to make a custom class which contains the dictionaries and
arrays.

To write a generetic data source for objects like dictionaries, arrays, etc. you can also address your data with a string (or key path), and let the string represent the item.

For example, the following items represents an "address" to an object.

"rootObject.MyKey" -> [rootObject objectForKey:@"MyKey"]
"rootObject.MyKey.2" -> [[rootObject objectForKey:@"MyKey"] objectAtIndex:2]

You will have to take care of the item string retain and release
yourself, since NSOutlineView doesn't do that; when creating them, add
it to a "garbage array".

You will have to write your own code for evaluating "rootObject.MyKey"
as the statement [rootObject objectForKey:@"MyKey"], but it turns out
to be trival code.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Getting an NSOutlineView Item's parent
      • From: Scott Stevenson <email@hidden>
References: 
 >Re: Cocoa-dev Digest, Vol 3, Issue 1261 (From: The Beerbowers <email@hidden>)
 >Re: Getting an NSOutlineView Item's parent (From: Scott Stevenson <email@hidden>)

  • Prev by Date: Re: NSImage drawAtPoint & Transparency
  • Next by Date: Re: NSToolbar with NSSearchField crash (caused by menu?)
  • Previous by thread: Re: Getting an NSOutlineView Item's parent
  • Next by thread: Re: Getting an NSOutlineView Item's parent
  • Index(es):
    • Date
    • Thread