I'm stuck trying to understand a piece of NSOutlineView behavior. Perhaps I'm 
just missing the obvious solution, but I can't see it.

I have an view-based outline view configured as a source list. The list itself 
uses a data source, not bindings. The table cell view is a subclass of 
NSTableCellView, and subviews get their values via bindings. In short, it boils 
down to the standard text field being bound to TableCellView.objectValue.name. 
Instances of the table cell view are vended by 
'outlineView:viewForTableColumn:item:' and the view's objectValue is set in 
that same delegate method. The column is marked "editable", and the text field 
does indeed permit editing.

Everything works, except for one thing. If I click on a text field to begin 
editing, type a few characters, then press Esc, then editing ends, but the text 
doesn't revert to what it was before editing began.

The changed value isn't committed back to the model, though it does persist as 
state within the outline view. (For example, hiding and re-showing the row 
shows the same incorrect value.)

I looked for the same behavior in the TableViewPlayground sample project, and 
it *does* revert the displayed value when you press Esc, but I don't see any 
code or configuration to support the behavior.

Anyone run into this before, or got a suggestion where to look for a solution?

_______________________________________________

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

Reply via email to