Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopUpButton content bindings - item enable state



I ran into a possible gotcha...

I have some NSPopUpButtons which use bindings to populate themselves from a model object, and update their selected item based on selectedObject being bound to an NSArrayController's selection. The content is the model array of objects, and the content values are the objects' name property.

The model objects can become disabled, and I want to enforce the disabled state of the NSMenuItem in the popup button. Currently, the button items just use a SKWBooleanColorTransformer to draw the themselves with the appropriate disabled control color, but they are still selectable (which isn't really a problem, in fact).

Is there some way to perform selection validation, or should I manually disable the items?
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.