3 ms·
How easily can Tk be completely separated from Tcl? I've been taking an admittedly superficial look at this landscape; it seems that languages which have Tk bi
by kazinator 10y ago
How easily can Tk be completely separated from Tcl?
I've been taking an admittedly superficial look at this landscape; it seems that languages which have Tk bindings rely on the entire Tck/Tk package, and tend to have some Tcl cruft in them.
- coliveira 10y agoA lot of Tk is written in Tcl, so it is probably easier to write another toolkit rather than separate them.
- kazinator 10y agoI see; so what you're saying Tk bindings actually invoke Tcl execution, in addition to the lower level C API (functions named Tk_Whatever); i.e. there is no Tk without Tcl being interpreted.
- aninteger 10y agoYes this is correct. I looked into doing this to see if it was possible to use Tk with the Jim interpreter. It's probably possible but would be a significant investment of time. Tk has some deep integration into Tcl internals.
- coliveira 10y agoYes, interestingly Tk is the perfect Trojan horse. It is the simplest, most useful platform-independent toolkit ever written. But that simplicity is derived from its integration with Tcl, so Tcl needs to be installed everywhere Tk runs.
- segmondy 10y agoA lot of libraries implement Tk, so you can pretty much write Tk in ruby, python, perl, etc. The following link includes example in pure Tk, Python, Ruby & Perl. http://www.tkdocs.com/tutorial/firstexample.html http://www.tkdocs.com/tutorial/firstexample.html
- aninteger 10y agoThey do this by bundling A Tcl interpreter with the exception of PerlTk (not to be confused with Tcl::Tk extension)