View Full Version : Binding Keypath Modifiers?

Jun 10, 2009, 08:33 PM
I've got a very simple binding that enables a NSPopUpButton. The binding is a BOOL value. However I want the NSPopUpButton to be enabled when the BOOL value is false. Are there such a thing as keypath modifiers? Kinda like NSArray's @count, @max etc?

I've searched everywhere but am obviously calling it the wrong name if it does exist.

Thanks for your help.

I'd like something like

Jun 12, 2009, 11:37 PM
In IB's Bindings Inspector, try setting the Value Transformer to NSNegateBoolean. From the docs:
This value transformer negates a boolean value, transforming YES to NO and NO to YES.

Jun 13, 2009, 01:29 AM
Ahh yes! I knew this one wouldn't slip by you kainjow, thank you!