How do I bind a state of a NSMenuItem (enabled) to a specific value of an NSNumber ?
i.e.
if myNumber ==2 then my NSMenuItem should be enabled
I need to do this for several NSMenuItem:
i.e.
if myNumber = 3 then my second NSMenuItem should be enabled
thanks
If you want to use a transformer, I think you’d have to write it yourself, as in this example. It will register a class which defines a value transformer, which the system will then instantiate.
In case you want to register an instance as a value transformer, this doc has the details. The advantage if this will be that you can configure each instance differently without having to define a class for each situation.