Page 1 of 1

Property change bounds checking

Posted: Sat Nov 15, 2003 9:41 pm
by jasonb1
I used the sample theme device and hooked up += 1 and -= 1 property change buttons to the volume property. It looks like when I reach either end of the allowed range (1-99) it just keeps going and sets out of range values. Shouldn't the increment/decrement respect the allowed range, or am I missing something?



When I hook this up to a real device going to a serially controlled reciever, I think the out of range values will definately mess it up. Not to mention, it messes up the graphics as well in the gauge control when you get out of bounds.



I used this method instead of using a slider because clicking and dragging a slider control seems like it would be hard on a touch screen. If the sliders acted more like a window scroll bar where you can click the entire length of the bar to set a specific value, then it might be more workable for touch screens and I wouldn't need the up/down buttons.



- Jason

Posted: Sun Nov 16, 2003 3:26 am
by yaccri
Jason,



You can create an 'automatic' task (when conditins are met) that would check that the new value is within the range, and fix if necessary. It should look like:

If ('Receiver.Volume' is greater than '99') then

Change 'Receiver.Volume' to '99'



Make sure that the 'execution mode' of the task is set to 'when conditins are met'



HTH,

Yoram