• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Starting editing for a Row as soon as it is Added.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: "Sean McBride" <email@hidden>
  • Date: Thu, 27 Aug 2009 15:18:10 -0400
  • Organization: Rogue Research Inc.

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 tableColumnWithIdentifier: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

References: 
 >Starting editing for a Row as soon as it is Added. (From: Joshua Garnham <email@hidden>)

  • Prev by Date: Re: Reasons why QL would fail to create thumbnail?
  • Next by Date: Re: Making failed NSAsserts crash an app
  • Previous by thread: Starting editing for a Row as soon as it is Added.
  • Next by thread: Re: Starting editing for a Row as soon as it is Added.
  • Index(es):
    • Date
    • Thread