Page 1 of 1

Error when using +=1 and -=1

Posted: Thu Nov 18, 2004 4:53 pm
by dlmorgan999
I have created a script device which I use to set the volume level of a zone in my AV distribution system serial device. The script device contains a Volume property which is a numeric property with a range of 0 to 40. I have property change buttons bound to this property that send +=1 and -=1.



The problem I have is that once the volume is at 40 you can continue to push the Volume Up button but HouseBot complains. It doesn't cause any problems but I'd just like to find an elegant way to handle this. Can anyone suggest a way to handle this or is this something I just shouldn't worry about?



-- Dave

Posted: Thu Nov 18, 2004 5:48 pm
by ScottBot
What if you use a multi-state button. Have the default state just do the +=1. Have a state for "40" that just sets it to "40.

Posted: Thu Nov 18, 2004 9:53 pm
by dlmorgan999
That sounds like it should solve the problem nicely. Thanks for the idea!