Re: Changing the sequence of editing cells in NSTableView/NSOutlineView
Re: Changing the sequence of editing cells in NSTableView/NSOutlineView
- Subject: Re: Changing the sequence of editing cells in NSTableView/NSOutlineView
- From: "Doug Knowles" <email@hidden>
- Date: Sat, 19 May 2007 11:30:27 -0400
Thanks for the pointer, George.
For those who benefit from lurking (as I often do), I ended up with
the following in my subclass of NSOutlineView:
- (void)textDidEndEditing:(NSNotification *)aNotification
{
int editedRow = [self editedRow];
[self validateEditing];
[self abortEditing];
// because I use variable-height rows...
[self noteHeightOfRowsWithIndexesChanged:[NSIndexSet
indexSetWithIndex:editedRow]];
// grab the keyboard back
[[self window] makeFirstResponder:self];
}
I omitted the call to [super textDidEndEditing...] because I don't
want the outline view to ask to edit following cells; I use those
calls to trigger other behaviors.
I suppose I am at risk for not getting the complete functionality of
textDidEndEditing, but so far I'm not observing any ill effects...
Thanks again to all that contribute to this list.
Doug K;
On 5/18/07, George Orthwein <email@hidden> wrote:
This should do it:
http://www.cocoabuilder.com/archive/message/cocoa/2002/11/1/70749
On May 17, 2007, at 11:04 PM, Doug Knowles wrote:
> The problem is that table/outline views want to open the "next" cell
> for edit on tab or return. The view code does this by traversing the
> cells in the view in column or row order (depending on what key closed
> the edit), invoking outlineView:shouldEditTableColumn:item: on each
> until the delegate returns YES.
I was recently trying to decipher this behavior to allow tabbing to
non-text based cells. Only the text-based cells invoked
shouldEditTableColumn though. I'm still looking for pointers if
anyone's interested. :)
http://www.cocoabuilder.com/archive/message/cocoa/2007/5/11/183095
George
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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