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: Mario Kušnjer <email@hidden>
- Date: Tue, 6 Oct 2009 18:43:36 +0200
Again me !
Just a little update !
I packed previous code in combined message calls.
Here's how it looks now:
if ([lsOutlineView selectedRow] < 0)
{
Parent *parent = [Parent new]; <--- create new Parent object
[sourceListLevelZero addObject:parent]; <--- add newly created
Parent object to root array
[lsOutlineView reloadItem:nil reloadChildren:YES];
[lsOutlineView expandItem:nil expandChildren:YES];
[lsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:
[lsOutlineView rowForItem:parent]] byExtendingSelection:NO]; <---
select row according to index from indexSet created with row index of
outline view for item - parent
[parent release]; <--- release Parent object
}
Again this works fine.
Ok, that's it.
Bye !
Mario Kušnjer
email@hidden
+385957051982
mariokusnjer@skype
_______________________________________________
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