On May 20, 2009, at 09:24, Stuart Malin wrote:

In the specific case which I am working with, the UI element does not correspond to a model value of the application's data. The control is used only to change the presentation of the model data. Hence, a change to the UI would necessitate, well, corresponding changes to the UI. In my implementation, only the UI controller (for this portion of the UI) is affected by the state change of the segmented control. I guess one could make an argument for the case that this presentation state is a model attribute of the UI.


Indeed, that situation happens, and that's not something I'd classify as a design flaw.

On May 20, 2009, at 1:04 AM, Quincey Morris wrote:


You can bind to the selectedSegment of a segmented control, and that
will indeed produce a notification when the state of the control
changes.

It was pointed out to me what I said happens to be false. NSSegmentedControl is not KVO-compliant for its 'selectedSegment' property, so no notification will be produced. The spirit is willing but the flesh is weak.

That's true of many properties of controls and other UI elements, perhaps because it is uncommon to bind to them, as we have been discussing. (Perhaps also, I've always speculated, because their implementations pre-date KVO and there was no particular need to re- implement them compliantly.)


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to