Re: get the selection in an NSOutlineView

2010-06-09 Thread Jens Alfke
On Jun 8, 2010, at 9:40 PM, Graham Cox wrote: At the time you call -selectedRowIndexes, you should then extract the items corresponding to those indexes from your data model (e.g. using [NSArray objectsAtIndexes:]) before the user has a chance to change the arrangement. Actually I just

Re: get the selection in an NSOutlineView

2010-06-09 Thread Rua Haszard Morris
Thanks all, itemForRow was the missing piece of the puzzle. Now this thing makes sense.. At the time you call -selectedRowIndexes, you should then extract the items corresponding to those indexes from your data model (e.g. using [NSArray objectsAtIndexes:]) before the user has a chance to

get the selection in an NSOutlineView

2010-06-08 Thread Rua Haszard Morris
I have an NSOutlineView which has a single column, and 2 levels of tree - each item in the list can have child items but those subitems don't have children. How can I determine the selected items? NSTableView -selectedRow returns row indices that change dependent on whether parent items are

Re: get the selection in an NSOutlineView

2010-06-08 Thread Graham Cox
On 09/06/2010, at 2:29 PM, Rua Haszard Morris wrote: I have an NSOutlineView which has a single column, and 2 levels of tree - each item in the list can have child items but those subitems don't have children. How can I determine the selected items? -selectedRowIndexes NSTableView