Gisle Aas <> wrote:
> On May 10, 2007, at 09:58, Kenneth Ölwing wrote:
> 
>>> The ActiveState preferred choice of Perl GUI toolkit is Tkx (or
>>> Tcl::Tk). Tkx is bundled with the latest ActivePerl releases for
>>> all 32-bit platforms. It does provide native look-and-feel on
>>> Windows (including themed widgets on WinXP) and OS X (Aqua) and
>>> does X11 on the rest of the Unix platforms.
>> 
>> This statement just prompted some confusion that I'd like to take the
>> opportunity to hopefully resolve...
>> 
>> In short, what's up with the different Tk offerings there apparently
>> is?
> 
> Let me try to explain then:
> 
> Tk is an extension for the Tcl runtime that provide a Tcl language
> API for writing GUI applications. 
> 
> Tkx is a bridge to an Tcl language interpreter that also loads the Tk
> extension for you.  Recent versions of ActivePerl ships with a
> dynamic library (tkkit.dll) that contains the latest stable version
> of the Tcl language runtime and some useful Tcl extensions including
> Tk (read "perldoc Tcl::tkkit" to figure what's included).  This allow
> Tkx to load even if you don't have ActiveTcl or another version of
> the Tcl language runtime installed on your machine.  If you have a
> Tcl runtime installed you can tell Tkx to connect to it by setting an
> environment variable.        
> 
> Perl/Tk is a binding to the Tk extension that bypass the Tcl
> language.  In order to achieve this it uses a modified version of the
> Tk sources.  This approach has the disadvantage that it's (hard) work
> to update the sources to more recent versions of Tk.  Because nobody
> has been willing to do this work Perl/Tk has basically been frozen at
> Tk version 8.4.5 for many years now with very limited access to other
> Tk extensions provided by the Tcl community.  One effect of this is
> that Perl/Tk applications need X11 on Mac OS X and doesn't get the
> native Aqua look.        
> 
> Tcl::Tk is using the same bridge to Tcl as Tkx is using but tries to
> maintain the Perl language source API that Perl/Tk invented.  Tkx
> goal was not to preserve the Perl/Tk API, but to provide a clean/
> minimal API that give you direct access to the Tcl objects.  Tcl::Tk 
> is not distributed with ActivePerl, but you can install it with ppm.
> If you have an old application written for Perl/Tk it ought to be
> less work to port it to Tcl::Tk than to Tkx.  Your mileage may vary. 
> 
> I would regard Perl/Tk as legacy code in ActivePerl.  It's there to
> support old applications written against that API.  For new
> applications Tkx is recommended as that give you access to the newest
> development to the Tk code base.  As Jan said Tkx is what we use to
> write all the Perl GUI tools at ActiveState.    

Just to add my 2p worth.

There is a lot of documentation, and plenty of examples, for Tk, but they are 
Tcl based. This is, for me at least, a significant obstacle to switching to use 
Tkx. Until that changes (and it is several months since I looked*), or I get a 
better understanding of Tcl, and I don't currently have either the time or a 
pressing need for that, I don't see me using Tkx in the near future.

My advice to the OP is to try writing a demo, or proof of concept, programs 
using both Tk and Tkx, and make your decision based on that. If you decide on 
using Tkx, then publishing those demo programs would be of great use to those 
trying to make the same decision as you, or those who are familiar with Tk 
wondering how to use Tkx. I would certainly be in the latter group.

[* If that has changed, I would be grateful for any pointers.]

HTH

-- 
Brian Raven 

=========================================
Atos Euronext Market Solutions Disclaimer
=========================================

The information contained in this e-mail is confidential and solely for the 
intended addressee(s). Unauthorised reproduction, disclosure, modification, 
and/or distribution of this email may be unlawful.
If you have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message do not 
necessarily reflect those of Atos Euronext Market Solutions.

Atos Euronext Market Solutions Limited - Registered in England & Wales with 
registration no. 3962327.  Registered office address at 25 Bank Street London 
E14 5NQ United Kingdom. 
Atos Euronext Market Solutions SAS - Registered in France with registration no. 
425 100 294.  Registered office address at 6/8 Boulevard Haussmann 75009 Paris 
France.

L'information contenue dans cet e-mail est confidentielle et uniquement 
destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. 
Toute copie, publication ou diffusion de cet email est interdite. Si cet e-mail 
vous parvient par erreur, nous vous prions de bien vouloir prevenir 
l'expediteur immediatement et d'effacer le e-mail et annexes jointes de votre 
systeme. Le contenu de ce message electronique ne represente pas necessairement 
la position ou le point de vue d'Atos Euronext Market Solutions.
Atos Euronext Market Solutions Limited Société de droit anglais, enregistrée au 
Royaume Uni sous le numéro 3962327, dont le siège social se situe 25 Bank 
Street E14 5NQ Londres Royaume Uni.

Atos Euronext Market Solutions SAS, société par actions simplifiée, enregistré 
au registre dui commerce et des sociétés sous le numéro 425 100 294 RCS Paris 
et dont le siège social se situe 6/8 Boulevard Haussmann 75009 Paris France.
=========================================

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to