restoring of button state
Posted: Tue Nov 10, 2009 7:08 am
OK, I haven't have much response on the last couple questions, hoepfully someone can help here because this is a show stopper problem right now.
I have a couple of buttons and check boxes used to swich the audio path. The simplest one (big button) on the surface surface is connected to a switch to turn the signal off (like a mute button). I have the value of the button in the paramaters and in thepreset list. All seems to work great, except....
If the button is on when I save the project, when I load it again, the button is still set but does not work. If press the button turning off, then again to turn it back on, it works. If I load the preset it also works, but not when loaded from the project.
If I load the project via the sdk, I find that on load, the button val is some large randon number like 3342523. But the button values limit is 0 and 1. Once I click the button it sets to 0 or 1 and all is fine.
The paramater list does have restore on project set so it seems like it should load the value. It acts like the displayed state of the button is saved and restored but not the val var on load. THe switches require 0 for off, 1 for on and anything else is off.
A second issue (which is the same) is i use a check box to select either 1 or 5 from a 1-6 selector. The button is set to min 1. max 5, step 5 (I forget the exact values) and all works fine except when the project loads the val is random again so nothing is selected until I click the button.
Seems like this should be a simple problem but I have yet to figure out how to correct this problem.
Anyone know why this is happening?
I have a couple of buttons and check boxes used to swich the audio path. The simplest one (big button) on the surface surface is connected to a switch to turn the signal off (like a mute button). I have the value of the button in the paramaters and in thepreset list. All seems to work great, except....
If the button is on when I save the project, when I load it again, the button is still set but does not work. If press the button turning off, then again to turn it back on, it works. If I load the preset it also works, but not when loaded from the project.
If I load the project via the sdk, I find that on load, the button val is some large randon number like 3342523. But the button values limit is 0 and 1. Once I click the button it sets to 0 or 1 and all is fine.
The paramater list does have restore on project set so it seems like it should load the value. It acts like the displayed state of the button is saved and restored but not the val var on load. THe switches require 0 for off, 1 for on and anything else is off.
A second issue (which is the same) is i use a check box to select either 1 or 5 from a 1-6 selector. The button is set to min 1. max 5, step 5 (I forget the exact values) and all works fine except when the project loads the val is random again so nothing is selected until I click the button.
Seems like this should be a simple problem but I have yet to figure out how to correct this problem.
Anyone know why this is happening?