Page 1 of 1

executing a case statement from an external button

Posted: Tue Oct 20, 2009 8:18 pm
by Tron621
Ihave a pip up menu that I am executing a case statement based on the choices. I want to know if I can call the elemtents in the case statement from say a button whose function is to select the previous case statement from the current chosen one.
so I have a case statement

on popupbutton
switch foo

case "isfoo"
etc
etc
break
case "is isfoo"
etc
etc
break
end popupbutton


It works when I use the popup button where it resides...

I want to call case
"isfoo" from an alternate button on the card say a tnextButton

on mouseup
call the case element "isfoo"

end mouseup

does any of that make sense?

Posted: Tue Oct 20, 2009 10:36 pm
by FourthWorld

Code: Select all

dispatch "popupbutton" to btn "MyButton" with "isfoo"

Case....

Posted: Wed Oct 21, 2009 6:36 pm
by Tron621
Hey I have version 2.9 there is not a dispatch command in this version.. thanks though

Posted: Wed Oct 21, 2009 8:08 pm
by Janschenkel
In that case, revert back to the good ol' send command:

Code: Select all

put "isfoo" into tParam
send "popupbutton tParam" to btn "MyButton"
Of course you'll have to add a formal parameter to your popupbutton handler.

HTH,

Jan Schenkel.