Cocoa Bindings Gotcha: 'Conditionally Sets Editable'
Cocoa Bindings Gotcha: 'Conditionally Sets Editable'
- Subject: Cocoa Bindings Gotcha: 'Conditionally Sets Editable'
- From: Jerry Krinock <email@hidden>
- Date: Mon, 27 Jan 2014 07:54:00 -0800
I just spent an hour trying to figure out why a text view (NSTextView) whose ‘Editable’ checkbox I had switched off was editable when the app ran.
The problem was that I had bound its ‘Attributed String’ binding, and in the options of this binding, 'Conditionally Sets Editable’ was switched on.
Cocoa Bindings Reference says that this option "determines if the editable state of the user interface item is automatically configured based on the controller's selection. If YES, the item's editable state is configured automatically. The user interface item will not be editable when the value represents a multiple selection, unless the selected objects are considered equal.”
I cannot think of a use case for this bindings option in a text view. I am even more incredulous that this bindings option is ON by default.
_______________________________________________
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