Editable OutlineView with Cocoa Bindings

432 views Asked by At

How do you bind the NSOutlineView (or NSTableView) so that the items can be editable? I know that there's the editable field for it but I'm not sure how to use it so any help for it would be nice. I have a NSTreeController that's bind to a NSArray. Thanks.

1

There are 1 answers

0
Elise van Looij On BEST ANSWER

Editable is not a property of NSTableView or NSOutlineView but of NSTableColumn. And if you check Cocoa Bindings Reference, you'll find that NSTableColumn also exposes an NSEditableBinding (well, it doesn't say so, but it does -- one of the idiosyncrasies of Apple's documentation). When you set the binding, either programmatically (bind:) or in IB, add or check NSConditionallySetsEditableBindingOption to the options, and you're all set.