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?
executing a case statement from an external button
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
executing a case statement from an external button
if 6 was 9 then...
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Code: Select all
dispatch "popupbutton" to btn "MyButton" with "isfoo"
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Case....
Hey I have version 2.9 there is not a dispatch command in this version.. thanks though
if 6 was 9 then...
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
In that case, revert back to the good ol' send command:
Of course you'll have to add a formal parameter to your popupbutton handler.
HTH,
Jan Schenkel.
Code: Select all
put "isfoo" into tParam
send "popupbutton tParam" to btn "MyButton"
HTH,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com