Konovalov, Vadim (Vadim)** CTR ** wrote:
Hi,
I've CCed to the proper mailing list which is for both users and for developers.
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.
Great!
I don't think 100% compatibility is achievable (due to some changes to
the tk source that perl/tk has, e.g. the whole XEvent mechanism), but I
think we can get pretty close.
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.
One of "tough" points is megawidgets. Will you provide the compatibility that
far?
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.
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 don't think perl/tk uses Tix for megawidgets. It uses its own perl
delegation mechanism to achieve mega-widgets.
I have implemented pure-perl mega widgets using the same mechanism that
perl/tk uses, primarily for compatibility with existing perl/tk
megawidgets.
If you are interested, I can seen my updates to Tcl::Tk to
you for your
review.
That would be great, thanks in advance!
I will tar up the pacakge with the changed files, make up a README file
and send it out.
Thanks,
John