Re: Retrieving the selected object in an NSOutlineView.
Joshua Garnham <joshua.garnham-/[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the Advice, I'll have a look at the things you mentioned. Cheers, Josh. ________________________________ From: Christiaan Hofman <[email protected]> To: Joshua Garnham <[email protected]> Cc: [email protected] Sent: Friday, 18 September, 2009 21:36:09 Subject: Re: Retrieving the selected object in an NSOutlineView. On Sep 18, 2009, at 19:18, Joshua Garnham wrote: I >am looking to retrieve the selected object in an NSOutlineView so I can >see if the selected object has any children. How would I do this? >I know the NSTreeController has selectedObject but how would I implement this and then check if it has children. >Cheers! > Your question is really not very clear. But if I understand you correctly, you want to know how to access properties like the count of the children of the real objects in your model object corresponding to the selection in the NSTreeController to which the NSOutlineView is bound. All you need to know for this is that the objects managed by the NSTreeController are wrappers of class NSTreeNode. From there the answers should be obvious from the documentation of this class. Christiaan