http://qs1969.pair.com?node_id=580287

grinder has asked for the wisdom of the Perl Monks concerning the following question:

I've been playing with Activestate's latest release, and I'm very impressed with the guied version of ppm. Snooping around in the source, it uses a package name Tkx. This is Gisle Aas's take on creating a Tk/Tcl interface. The end result is impressive: an application that has a true native look and feel about it. I want to know how easy it is to build something like it.

My question is, (and now that I think about it, it's not a really a Tkx question per se, but) are there any GUI builders around that let you drag widgets around the screen in a nice manner, and then spits out Perl stubs to flesh out the functionality? Bonus points for being able to round-trip the code through the designer and get it out again the other side, after having added or removed new widgets.

Other languages have these tools. Does Perl? I don't want to have to write 200 lines of method calls to build up my screen. That's so 20th century.

• another intruder with the mooring in the heart of the Perl

Replies are listed 'Best First'.
Re: Building GUIs with a GUI
by planetscape (Chancellor) on Oct 24, 2006 at 15:12 UTC

    This recent thread: GUI toolkit choice, appears to offer a nice overview of the available choices.

    HTH,

    planetscape
Re: Building GUIs with a GUI
by Fletch (Bishop) on Oct 24, 2006 at 14:31 UTC
Re: Building GUIs with a GUI
by gellyfish (Monsignor) on Oct 24, 2006 at 14:31 UTC

    There is a perl binding for Glade which works quite nicely, however I'm not convinced that is particularly cross-platform.

    /J\

Re: Building GUIs with a GUI
by g0n (Priest) on Oct 24, 2006 at 15:58 UTC
    I'm tinkering with wxGlade at the moment, with a moderate degree of success. Johan Vromans wrote a good article in the summer Perl Review on writing and maintaining GUIs with wxGlade. According to the article, wxGlade will round trip code in the way you describe, although I haven't tried it yet.

    Of course, it generates Wx code, which is subject to the caveats on getting Wx to work I mentioned in the thread planetscape already cited.

    You may also want to look at this thread on ZooZ - which generates Tk code.

    --------------------------------------------------------------

    "If there is such a phenomenon as absolute evil, it consists in treating another human being as a thing."
    John Brunner, "The Shockwave Rider".

Re: Building GUIs with a GUI
by doowah2004 (Monk) on Oct 24, 2006 at 17:17 UTC
    You can check out Loft it is quite nice, but builds the gui for win32::Gui. It is a pain to install though, at least it was for me because of a conflict in the generation of the html documents, but after I changed the site for the install it all went smooth.

    I have had very good results using the tool.
Re: Building GUIs with a GUI
by vkon (Curate) on Oct 25, 2006 at 13:47 UTC
    Tkx is small pure-perl module, which uses small Tcl module to connect to Tcl/Tk, which provides far more flexible GUI than perl/Tk.

    Yes, you can use any GUI builder from Tcl/Tk and then use either Tkx or Tcl::Tk for further programming.

    I use this approach now in all my Tk applications (although I do not actually use vtcl anymore, but I do mix pure-Tcl code with perl/Tk code).

    So, welcome to the club!
    Join mailing list tcltk-at-perl.org!
    (this ML serves 3 CPAN modules: Tkx, Tcl::Tk and Tcl)