Hi Roger
I'm sure I missed the point of this thread. I'll go through it more carefully.
But could you tell me how this "mouseUP" handle fails to do the job?
Thanks,
Jim
on mouseUp
put field 1 into tAngle
put tAngle*pi/180 into tAngle
--put the label of btn "myOptiionMenu" into sOption
put the label of button "myOptionMenu" into tTrigFunct
switch tTrigFunct
case "sine"
put sin(tAngle) into tValue
put "The sine of " & tAngle*180/pi & " degrees is " & tValue into
tResult
break
case "cosine"
put cos(tAngle) into tValue
put "The cosine of " & tAngle*180/pi & " is " & tValue into tResult
break
case "tangent"
put tan(tAngle) into tValue
put "The Tangent of " & tAngle*180/pi & " is " & tValue into tResult
end switch
put tResult into field 2
end mouseUp
>
> Message: 5
> Date: Fri, 07 Dec 2012 12:10:28 -0800
> From: Roger Guay <[email protected]>
> To: How to use LiveCode <[email protected]>
> Subject: Capture the Trig Function from an Option Menu Button
> Message-ID: <[email protected]>
> Content-Type: text/plain; CHARSET=US-ASCII
>
> 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