Need help with Menu
Posted: 08 Apr 2013 01:03
Hi,
i have a Problem with the Menu Object. I have a button, a Menu and a global variable that saves the index of the currently selected Menu item when the button is pushed.
The menu sets the text of a couple of Knobs according to the selection (i am selecting a Fx device for Send 1 in Reason with that Menu). I have a second menu that does the same for Send 2 (sets the text of the device in Send 2 in Reason) so i need a way to reset the first menu. Thats what the button was meant for. I want it to take the index of Menu1 then set Menu1 to 0 and then back to the index so all text is set to the original setting for Menu1.
The script in the button looks like this:
sel1=Menu1.selection;
Menu1.selection=0;
Menu1.selection=sel1;
When i put in lets say 5 instead of sel1 the Menu jumps to 5 like expected and it sets the text to what is specified under index 5. Most likely it ignores the jump to 0 and just jumps to sel1 on which it is already sitting so the text setting scripts dont get triggered again. How do i make it to go to 0 and then to sel1? Some kind of wait in between to give it more time?
i have a Problem with the Menu Object. I have a button, a Menu and a global variable that saves the index of the currently selected Menu item when the button is pushed.
The menu sets the text of a couple of Knobs according to the selection (i am selecting a Fx device for Send 1 in Reason with that Menu). I have a second menu that does the same for Send 2 (sets the text of the device in Send 2 in Reason) so i need a way to reset the first menu. Thats what the button was meant for. I want it to take the index of Menu1 then set Menu1 to 0 and then back to the index so all text is set to the original setting for Menu1.
The script in the button looks like this:
sel1=Menu1.selection;
Menu1.selection=0;
Menu1.selection=sel1;
When i put in lets say 5 instead of sel1 the Menu jumps to 5 like expected and it sets the text to what is specified under index 5. Most likely it ignores the jump to 0 and just jumps to sel1 on which it is already sitting so the text setting scripts dont get triggered again. How do i make it to go to 0 and then to sel1? Some kind of wait in between to give it more time?