Question: cant calculate expression in TextField/Box

This problem agonize me for a long timeand i cant to solve it. For example, in one TextField in maplet i want to insert e.g. "0" and in second TextBox to get result of e.g. cos(0) apropos "1". But i get cos(0). I was try to solve this with eval, evaln and evalf command but nothing get. Won't to insert number in one TextField and to calculate e.g. cos() in other TextBox. Someone know how to? program: restart; Calc:= proc() global theta: cos(theta); end proc: with(Maplets[Elements]): DKP:= Maplet(onstartup = A0, Window[W1](title="DKP", [TextField[theta](),TextField[result](), Button("Calculate", onclick = A1) ]), Action[A1](Evaluate( result=Calc()) ), Action[A0](RunWindow(W1)) ): Maplets[Display](DKP); Try to enter 1 or 90 or... u get cos(1 or 90 or ...) but not calculated expression!?
Please Wait...