in reply to Wx vs. Tk

Tk is actually a very well-designed module. It's got a number of advantages over other Perl toolkits, including the following: I'm not too sure why you'd call the design confusing and ugly. I find it to be very scalable; it's equally simple to develop a barebones interface or to make an advanced widget with all kinds of bells and whistles. It requires a lot less code than Wx does, and is a little more Perlish for that. For instance, I can write and test a quick addition script in a matter of minutes with Tk:
use Tk; $mw = MainWindow->new; $e1 = $mw->Entry->pack; $e2 = $mw->Entry->pack; $sum = $mw->Label->pack; $mw->Button(-text => 'Compute', -command => sub { $sum->configure(-text => ($e1->get() + $e2->get())); })->pack; MainLoop;
In Wx, that would require all kind of infrastructure that isn't really necessary for such a simple script. Of course, There's More Than One Way to Do It, so that might be a good thing if that's the kind of stuff you're into.

I can definitely see your point about the appearance of Tk, but it doesn't have to be that way. See my node about improving Tk's interface. Basically, try adding the following lines to the top of your app:
$mw->optionAdd("*font", "-*-arial-normal-r-*-*-*-120-*-*-*-*-*-*"); $mw->optionAdd("*borderWidth", 1);
Of course, replace $mw with whatever scalar you keep your MainWindow in. I think that the revised interface looks a lot better than the standard one.

I was trying to resist, but I can't help but make a shameless plug here. Download milkbone from http://milkbone.org and take a look at the interface. It was created completely with Perl/Tk, but, IMHO, it looks as good as any other application.

So I would suggest giving Tk another look. It's actually a very nice piece of software to work with.
The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows. - Frank Zappa

Replies are listed 'Best First'.
Re: Re: Wx vs Tx (OT) - milkbone
by zakzebrowski (Curate) on Oct 19, 2003 at 21:12 UTC
    Wrt your mikbone, (I browsed the faq / documentation and I didn't find out of the box support), could you support 'proxy' connections through non-standard ports? (Eg, I'm behind a firewall at work, and I couldn't get it to work because of it... though I still want to try it out at some point... If I tried to use port 23 for communication with aol it should work...) Otherwise cool points in your message. I have yet to dig into Tk (or wx) myself because I'm either developing code for the console or writing a web app for what I need to do...
    Cheers.


    ----
    Zak
    undef$/;$mmm="J\nutsu\nutss\nuts\nutst\nuts A\nutsn\nutso\nutst\nutsh\ +nutse\nutsr\nuts P\nutse\nutsr\nutsl\nuts H\nutsa\nutsc\nutsk\nutse\n +utsr\nuts";open($DOH,"<",\$mmm);$_=$forbbiden=<$DOH>;s/\nuts//g;print +;
      It's funny you should mention that, because that's exactly what I was working on today. :)

      The next release ought to include proxy support.


      The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows. - Frank Zappa