Not a bug, just a fancy use of bindings with NSLevelIndicator…

Hi,

Do you know that if you bind the critical value of NSLevelIndicator, it does not refresh in all cases?

Say you set your min value to 0, you max value to 1, and then bind (via a delegate’s property) your critical value to a “Make it red” check box, then when you set the checkbox ON, the critical value is set to 1 and your NSLevelIndicator passes to red. Great. But when you set the checkbox to OFF, the NSLevelIndicator stays red until you click on it, or on the window containing it.

So I had to bind a method to the checkbox:

on turnThisStupidIndicatorToGreenBecauseCocoaDoesNotDoIt_(sender)
    theLevel's display() -- displayIfNeeded() does not convince the level indicator.
end

Ok, detail, detail. Ok, not conforming to Interface Guidelines. Ok, “this is not meant to be used like this”. Ok.

Anyway, when you reach this kinds of problems, your app is close to be shipped.