• 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
NSOutlineView cell editing behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOutlineView cell editing behavior


  • Subject: NSOutlineView cell editing behavior
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 07 Feb 2013 16:00:07 -0800

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 (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

  • Follow-Ups:
    • Re: NSOutlineView cell editing behavior
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Detecting a native Cocoa app ?
  • Next by Date: Re: QR code reader/generator SDK
  • Previous by thread: Re: Detecting a native Cocoa app ?
  • Next by thread: Re: NSOutlineView cell editing behavior
  • Index(es):
    • Date
    • Thread