Starting editing for a Row as soon as it is Added. (More Detail)
Starting editing for a Row as soon as it is Added. (More Detail)
- Subject: Starting editing for a Row as soon as it is Added. (More Detail)
- From: Joshua Garnham <email@hidden>
- Date: Wed, 19 Aug 2009 17:31:39 +0000 (GMT)
Hi There,
I have an NSOutlineView and what I want to happen is that when a row is
added I want the row that has been added to Start Editing immediately
like when you double click on a row.
I have had a go using the code below (but as I'm not that Confident with Cocoa) it did not work.
- (IBAction)add:(id)sender {
[treeController add:@"New Item"];
[outlineView rowForItem:(id)@"New Item"];
[outlineView editColumn:0 row:1 withEvent:nil select:YES];
}
The action is connected to the Add button in the Outline View.
The line -> [outlineView rowForItem:(id)@"New Item"];
Is supposed to give the row number of the added row to the next line
-> [outlineView editColumn:0 row:1 withEvent:nil select:YES];
instead of the number 1.
So what I am supposed to replace @"New Item" with in Lines 1 and 2 and make it do the above?
Thanks,
Josh.
_______________________________________________
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