Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top