If the problem is with the index path, you could get selectedRowInColumn:0 and construct your own index path with the returned value. -- Gary L. Wade http://www.garywade.com/
On 4/4/2013 2:13 PM, "Paul Wasmund" <pwasm...@orderndev.com> wrote: >I am trying to use editItemAtIndexPath:withEvent:select: in my program to >programatically start editing the text in my cell. It works for all items >except those in the first column. As an experiment I added code to the >Apple sample ComplexBrowser and the same thing happened. Is this a bug, >by design, or are there extra hoops to jump through to get this to work >in the first column? > >The cells in the first column CAN be edited via clicking in the text of a >selected cell. > >ComplexBrowser changes: > >Add to appController.m > >- (void)awakeFromNib { > >... > > [_browser setAction:@selector(_browserClicked:)]; // add to end of >awakeFromNib >} > > >- (void)_browserClicked:(id)sender >{ > FileSystemBrowserCell *cell = [_browser selectedCell]; > [cell setEditable:YES]; > NSIndexPath *path = [_browser selectionIndexPath]; > [_browser editItemAtIndexPath:path withEvent:nil select:YES]; >} > >- (BOOL)browser:(NSBrowser *)myBrowser shouldEditItem:(id)item >{ > return YES; >} > >Selecting any cell in the browser should put it into edit mode. Only >works for items in columns other than the first one. > > >Paul _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com