Capture the Trig Function from an Option Menu Button
Jerry Jensen
jhj at jhj.com
Fri Dec 7 18:21:25 EST 2012
On Dec 7, 2012, at 3:02 PM, Roger Guay <irog at mac.com> wrote:
> Very close but still no cigar.
>
> I did the following to monitor what was happening
>
> on thisHandler
> put the label of btn "myOptionMenu" into sOption
> end thisHandler
>
> on otherHandler theta
> get "put the" && sOption && "of" && theta
> do it
> put it&&the result
> end otherHandler
>
> When I execute this for theta = pi/4, I get "put the Sin of 0.785398" with the result being empty. I I then copy "put the Sin of 0.785398" and paste back into the message box, it works with .707, the correct answer.
I think the line -do it- is actually executing -do "put the"- and the rest of it is ignored but doesn't (should?) make an error. The result would be empty.
Maybe parens like
get "(put the" && sOption && "of" && theta & ")"
would help?
(untested)
.Jerry
More information about the use-livecode
mailing list