Question

I have a mac application that i have created that measures bandwidth. I have setup alerts for the user when they have reached a certain percent of the bandwidth. I have options to disable the warning value (yellow bars) and the critical cells (red bars).

The issue is that when the user "turns off" the critical value both upload and download bars turn red (no matter what their position is).

What I am doing is "Off" sets the critical or warning values to 100% of the maxValue. This seems to work for turning off both critical and warning alerts (only green bars).

So my question is, is there a way to disable the critical values (red) and/or the warning values (yellow)?

No correct solution

OTHER TIPS

This is kind of a hack... but I've disabled the warning section in my app by doing something like the following:

levelIndicator.criticalValue = threshold;
levelIndicator.warningValue = threshold-.00001; 

If I make them equal, both are disabled and the bar is always green, but by making the warning some tiny bit below the critical level, it goes from green to red, and I never see any yellow. (The difference between engineering and mathematics... )

To disable the critical/red section, and show only green and yellow, try something like:

levelIndicator.warningValue = threshold;
levelIndicator.criticalValue = levelIndicator.maxValue+1;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top