Roger,
Is this what you are looking for?
If your script is triggered by a change of the option menu, then this format
should work…
on menuPick pItemName
switch pItemName
case "sin"
put the sin of fld 1 into fld 2
break
case "cos"
put the cos of fld 1 into fld 2
break
case "tan"
put the tan of fld 1 into fld 2
break
end switch
end menuPick
But if you want the card script to read the option menu choice after it has
been made, then leave the button script empty and use something like this in
your card script…
command thisHandler
put the label of btn "myOptiionMenu" into tOption
switch tOption
case "sin"
put the sin of fld 1 into fld 2
break
case "cos"
put the cos of fld 1 into fld 2
break
case "tan"
put the tan of fld 1 into fld 2
break
end switch
end thisHandler
Paul
On 2012-12-07, at 12:10 PM, Roger Guay wrote:
> I know this is probably a stupid question, but I can't seem to make it work:
>
> I have an Option Menu button with sin, cos, tan as menu Items. I want my card
> script to take the label of that button, and then perform the trig function
> with that label. I've tried every thing I can think of to "get", "do" or in
> general assemble the script, but to no avail. Any suggestion?
>
> TIA,
> Roger
>
> _______________________________________________
> use-livecode mailing list
> [email protected]
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode