[Israel.pm] Perl GUis
dovl at freescale.com
Fri Dec 8 03:54:44 PST 2006
There is absolutely nothing to prevent you from making you Tk GUIs
colorful. Use the background color options.
DSP SoC System and Applications Engineer,
Network and Computing Systems Group
Freescale Semiconductor Israel
The information contained in this email is classified as:
[ ] Freescale General Business Information
[ ] Freescale Internal Use Only
[ ] Freescale Confidential Proprietary
[x] Personal Memorandum
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
Behalf Of Shmuel Fomberg
Sent: Friday, December 08, 2006 00:48
To: 'Perl in Israel'
Subject: Re: [Israel.pm] Perl GUis
From: Jason Elbaum
Sent: Thursday, December 07, 2006 11:47 PM
>> Don't compare it to VB or other visual gui-editors. Compare it to
>> swing and other layout-driven systems.
> I don't know VB or Swing so I can't comment. I'm not comparing Tk to
> anything; I'm just observing its own properties.
> Perl is by nature a compact, concise language. I've hardly ever seen
> Perl/Tk code which is compact or concise. To me, that indicates flawed
Let me entertain you. Here is a code from Java's Swing, doing a small
"hello world" window:
---- Code start
JFrame frame = new JFrame("HelloWorldSwing");
JLabel label = new JLabel("Hello World");
---- Code End
It looks surprisingly similar to Tk. In perl you add the minus
parameters, (like "-text") but subtract (in the majority of the cases)
the add commands.
As I see it, for every element in the GUI, you need to declare it, you
need to set some parameters/actions for it, and you need to tell where
and how to put it. If you can say all this in fewer words, show me how.
>> In general, I think that programmer should not do GUI, and leave the
>> design work to the design people.
> Not everyone has "design people" to do GUIs for them.
Me neither. So accept that you GUI is functionality driven, and is ugly.
(or at least, difficult to use. Because we don't know where exactly to
put that label so the user won't ignore it and will click 'next'
Back on the issue that Tk is ugly: it was probably meant to run and look
the same everywhere. And the look that it took (probably from historic
reasons) is of the old UNIXs. Of course it will look better if it's
colorful, but it doesn't mean that it have to look bad. (that's what art
is all about)
Java solved this problem with look-and-feel packs, so you can change how
all your program looks (and feels) in one point. See:
Perl mailing list
Perl at perl.org.il
More information about the Perl