Capture the Trig Function from an Option Menu Button
J. Landman Gay
jacque at hyperactivesw.com
Fri Dec 7 17:32:20 EST 2012
Try:
local sOption
on thisHandler
put the label of btn "myOptiionMenu" into sOption
end test
on otherHandler theta
do "put the" && sOption && "of" && theta
end otherHandler
On 12/7/12 4:02 PM, Roger Guay wrote:
> Thanks for your help, Paul. Your second script is more like what I need. BUT, I need to capture the bare function to be used with angles that are derived from some other script. Something like:
>
> local theTrigFctn
>
> on thisHandler
> put the label of btn "myOptiionMenu" into tOption
> switch tOption
> case "sin"
> put sin into theTrigFctn --- you can't do this
> break
> case "cos"
> put cos into theTrigFctn --- you can't do this
> break
> case "tan"
> put tan into theTrigFctn --- you can't do this
> break
> end switch
> end thisHandler
>
> on otherHandler theta
> put theTrigFctn(theta)
> end otherHandler
>
> Thanks again,
> Roger
>
>
>
>
> On Dec 7, 2012, at 12:55 PM, Paul Hibbert <lc at pbh.on-rev.com> wrote:
>
>> 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
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list