Re: NSOutlineView - Automatically select newly added item - Help needed
Re: NSOutlineView - Automatically select newly added item - Help needed
- Subject: Re: NSOutlineView - Automatically select newly added item - Help needed
- From: Colin Howarth <email@hidden>
- Date: Tue, 6 Oct 2009 02:49:12 +0200
On 6 Oct, 2009, at 01:44, Mario Kušnjer wrote:
...
[lsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:
[lsOutlineView rowForItem:[Parent new]]] byExtendingSelection:NO];
It is the last line that trouble's me.
It should select newly added item in the list (right ?), but it does
not !
without trying to understand what's happening, or supposed to, you
could also (in cases like this) try TEMPORARILY unravelling your
method calls. Like this:
Parent *parent = [Parent new];
int index = [lsOutlineView rowForItem: parent];
NSArray *indices = [NSIndexSet indexSetWithIndex: index];
[IsOutlineView selectRowIndexes: indices byExtendingSelection:NO];
<< where I don't know what the actual classes are >>
Then you can check these intermediate steps, to see they're doing what
you think they should.
Then you can wrap it all up again once you've fixed it, to save screen
space :-)
--colin_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden