in reply to Re^4: Tk programmatically monitor change in Listbox
in thread Tk (Tcl::Tk) programmatically monitor change in Listbox
I dug around the TCL interface some and was astonished to find some of the neat things it can do.
If you look inside the TCL download https://cpan.metacpan.org/authors/id/V/VK/VKON/Tcl-1.27.tar.gz you will find in the t subdirectory set-callback.t (which can be inspected via https://fastapi.metacpan.org/source/VKON/Tcl-1.27/t/set-callback.t). This exposes a method to create a program in the perl environment and "link" it to a name that TCL can call directly.
The original code posted in this thread is in Tk because I want(ed) to find a solution to my proposed approach - which is indipendent to Tcl.
TK runs under TCL, there is nothing you do in TK that is independent from TCL.When you said $int->Eval(); you were invoking TCL.
There is another way as well. https://fastapi.metacpan.org/source/VKON/Tcl-1.27/t/createcmd.t, that is createcmd.t from the same t subdirectory.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Tk programmatically monitor change in Listbox
by Takamoto (Scribe) on Jan 08, 2020 at 08:47 UTC | |
Re^6: Tk programmatically monitor change in Listbox
by IB2017 (Pilgrim) on Jan 07, 2020 at 17:17 UTC | |
Re^6: Tk programmatically monitor change in Listbox
by jcb (Parson) on Jan 08, 2020 at 00:37 UTC |