On 06/10/2009, at 10:44 AM, Mario Kušnjer wrote:
[sourceListLevelZero addObject:[Parent new]];
[lsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex: [lsOutlineView rowForItem:[Parent new]]] byExtendingSelection:NO];
Assuming -addObject: in the first line adds the object to the end of the array, just do this:
[lsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex: [sourceListLevelZero count] - 1] byExtendingSelection:NO];
This generalises to any position - just find the index of the object you just added.
--Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com