in reply to Re^2: Applications of Perl\Tk
in thread Applications of Perl\Tk

ActiveState doesn't include Perl/Tk anymore. ActivePerl 5.10 and greater come with Tk, Tcl and the module Tkx to talk to them.

Sneakernet would take a while since my target servers are hundreds of miles away, virtual and in a blade setup which I would need help with anyway. I'm remoting into the servers. There is definately a glitch with 64 bit when the compiler isn't setup correctly. I have tried. I had no trouble with Strawberry Perl on my laptop compiling Perl/Tk but that wasn't useful if applications wouldn't work on the target. Then I discovered Tkx.

Replies are listed 'Best First'.
Re^4: Applications of Perl\Tk
by tej (Scribe) on May 14, 2011 at 02:12 UTC

    So if I want to create GUI using perl what is advisable to use? Tcl or Tk or Tkx?..

    I know there is no harm in learning anything, however if I am learning it I want it to be usefull in my profession

      So if I want to create GUI using perl what is advisable to use? Tcl or Tk or Tkx?

      Add wxPerl to the list of the GUI toolkits and choose one (or more), based on the features that any of the libraries provides.

      One can make a choice only after he learns at least at a basic level how to use them, and what are the differences between the widget capabilities. There are subtle, but important differences between the implementations, for example Tk::StatusBar labels can have color text and can be centered, but in wxPerl that's not yet implemented (at least in wxwidgets 2.8.11. This is not so important for the functionality of the application, but you got the point ...), on the other hand wxPerl has other advantages over PerlTk, including the fact that it is developed actively.

      What I mean is that you can implement a MVC pattern, an use any of the toolkits to create the view part of the application, you even can experiment with more than one toolkit. I have a experimental project of a database application on GitHub that uses PerlTk and wxPerl for the View part of the implementation (https://github.com/stefansbv/Tpda3)

      Regards, Stefan

        for example Tk::StatusBar labels can have color text and can be centered, but in wxPerl that's not yet implemented (at least in wxwidgets 2.8.11. This is not so important for the functionality of the application, but you got the point ...),

        Your overall point is a good one, but Tk::StatusBar is a poor example since it is a pure-perl widget, and wxStatusBar is the interface to the underlying systems native status bar

        You can get color text in a wxStatusbar, see How do I destroy a control after its creation in wxPerl?

        Or you can create the equivalent of Tk::StatusBar for wxPerl (and call it Wx::Perl::StatusBar ) by copying StatusBar.pm, and swapping Tk::Frame for Wx::Frame, Tk::ProgressBar for Wx::ProgressDialog, Tk::Label for Wx::StaticText, in about 10 minutes :)