Re: NSTableView cell editing: setObjectValue called on enter?
Re: NSTableView cell editing: setObjectValue called on enter?
- Subject: Re: NSTableView cell editing: setObjectValue called on enter?
- From: Michael Rothwell <email@hidden>
- Date: Tue, 28 Sep 2004 14:01:29 -0400
Ah yes, the archives. A start, anyway, on one of the issues.
http://cocoa.mamasam.com/COCOADEV/2002/01/2/22208.php
<x-tad-smaller>Michael Rothwell
email@hidden
</x-tad-smaller>
On Sep 27, 2004, at 11:17 PM, Michael Rothwell wrote:
Hello all,
I'm making a plugin for Mail (I know, bad idea), and in the 'advanced' preference pane, I've got an NSTableView to which the user can add, delete and edit items. There's a couple of odd things going on that I hope to gain some insight into.
1. After a cell is finished editing (by hitting enter or tab),
tableView:setObjectValue is called with a value of zero. There's a checkbox in the first column, so this always gets unchecked. I'l like to not have that happen, but haven't figured out a good way to stop it.
2. After a cell is finished editing, I re-sort the data, redisplay the table, and (this is the bit that doesn't work) select the new row of the edited data. I get a controlTextDidEndEditing, but I can't catch the (enter) key event. The default behavior is to select the cell right below the edited cell, for editing. So, at this point, editing has finished, I've updated the table display, the row is in the right place, and now an unwanted tableView:setObjectValue has fired for the wrong row and I'm editing a row I didn't want to edit, rather than the new row being selected (and that's all -- no editing or anything).
Any suggestions?
<x-tad-smaller>Michael Rothwell
email@hidden
</x-tad-smaller> _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden