Re: Starting editing for a Row as soon as it is Added.
Re: Starting editing for a Row as soon as it is Added.
- Subject: Re: Starting editing for a Row as soon as it is Added.
- From: Joshua Garnham <email@hidden>
- Date: Fri, 28 Aug 2009 15:27:24 +0000 (GMT)
Thanks Very Much Sean.
Just 2 Questions, Where do I put the Code? and How will the method know when a Row is Added?
Cheers,
Josh.
>________________________________
>From: Sean McBride <email@hidden>
>To: Joshua Garnham <email@hidden>; email@hidden
>Sent: Thursday, 27 August, 2009 20:18:10
>Subject: Re: Starting editing for a Row as soon as it is Added.
>
>On 8/27/09 4:42 PM, Joshua Garnham said:
>
>>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.
>
>@implementation NSTableView (RRExtra)
>
>- (void)makeEditableSelectedCellOfColumnIdentifier:
>(NSString*)inColumnIdentifier
>{
> NSTableColumn* column = [self tab
>leColumnWithIdentifier:inColumnIdentifier];
> if (column && ![column isHidden])
> {
> if ([self numberOfSelectedRows] == 1)
> {
> NSInteger columnIndex = [self
>columnWithIdentifier:inColumnIdentifier];
> NSInteger selectRowIndex = [self selectedRow];
> if ((columnIndex != -1) && (selectRowIndex != -1))
> {
> [self editColumn:columnIndex row:selectRowIndex
>withEvent:nil select:YES];
> }
> }
> }
>}
>
>@end
>
>--
>____________________________________________________________
>Sean McBride, B. Eng email@hidden
>Rogue Research www.rogue-research.com
>Mac Software Developer Montréal, Québec, Canada
>
>
>
_______________________________________________
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