Konovalov, Vadim (Vadim)** CTR ** wrote:
I have been looking at how to provide close to 100% perl/tk syntax
compatibility with your Tcl::Tk package. My motivation is that
I have a lot of code written with perl/tk and have been frustrated by
the lack of progress in getting a version of perl/tk compatible with
tk8.5 and the updated Tile widgets.
As a proof-of-concept, I have made changes to Tcl::Tk to make
it nearly
100% compatible with perl/tk. With these changes, perl/tk megawidgets
work, and all the perl/tk widget demos work with minimal changes.
I would gladly accept compatibility changes,
although I decided for me that 100% compatibility with perl/Tk is not my
goal - I still use perl/Tk syntax for managing widgets, but I use pure Tk
for creating them.
Now I am wondering where to take all this. Are you open to accepting
patches to Tcl::Tk that will provide better perl/tk syntax
compatibility, or do you think changes like these belong in a separate
module/package (maybe Tcl::pTk ) ?
I think Tcl::pTk is an excellent decision.
Another module name (as we've done with Tkx and it's slightly variant
syntax) or a keyword modifier sounds good.
Here are my thoughts on megawidgets support.
Perl/Tk's megawidget is based on Tix.
When I discussed the megawidgets question, I was advised against Tix,
because it is not so well maintained. Moveover, Tix is rarely installed (it is
not
shipped with ActiveTCL, for example)
However, another megawidget package - snit - isn't a perfect fit also.
It's not shipped with ActiveTcl, but it is in the teapot. However, Tix
is not a recommended extension anymore, having been superceded by either
core or other more modern and flexible widgets.
mkWidgets (http://wiki.tcl.tk/2106) suits quite well for Tcl::Tk megawidgets
(see an example at http://wiki.tcl.tk/13208) but this package seemingly hasn't
been changed since 11/2002 - this may be a good sign or a bad sign :) :) :)
both mkwidgets and snit are pure-tcl, and this is a plus compared to tix.
Now I am again inclined towards Tix for perl/Tk - capable widgets - although
it has some drawbacks, it still closer to original perl/tk megawidgets, and
now I use Tix in my applications anyway - so it is already a must-have package
for me :)
Needless to say, you're welcome to consider another Tcl packages for this
purpose also :)
I would recommend basing something on the core 8.5 widget set first and
foremost. That has the notebook, combobox, progressbar and treeview all
built in as core widgets. I'm not familiar with all the Perl/Tk
widgets, but something that transitions might be the most appropriate in
the long run (if you ignore a few widget options but have a much cleaner
look, is that acceptable?).
Jeff