in reply to Re: call a sub from Tcl code in Tcl::pTk
in thread call a sub from Tcl code in Tcl::pTk
The ->Eval method is meant for exceptional stuff which can't be done with normal Perl methods.
The normal approach is to use standard pTk->methods to build menus and windows.
If your special wish is even possible I doubt that you'll get a quick answer here.
Anyway ... if you just want to generate Tcl code from a Perl method inside your template you can do something like
->Eval(<<"__TCL__"); ... some Tcl Code @{[ my_perl_sub() ]} ... more Tcl Code __TCL__
the result from my_perl_sub() is inserted as string then, which will be interpreted as Tcl code.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: call a sub from Tcl code in Tcl::pTk
by Anonymous Monk on Apr 30, 2021 at 19:50 UTC | |
by LanX (Saint) on Apr 30, 2021 at 21:19 UTC |