It can be frustrating switching from an API you know well to one you don't. But Tk has been around a while and will probably do what you want.

For example, take your dialog box example. There is a messageBox method that is nearly as simple.

$answer = $mw->messageBox( -message => 'Are you sure you want to quit?', -title => 'Demo dialog', -type => 'YesNo', -icon => 'question', -default => 'yes' );
If that is still too much typing, put it in a sub with the customized defaults you desire. I do not know how to both derive a title from a main window and not have the dialog derived from a main window; pick one.

As for your browse widget, I've never needed such a thing, but you may want to check out the ListBox widget (chapter 7 of Mastering Perl/Tk is devoted to ListBoxes). Finally, I don't see what is preventing you from validating responses with regular expressions; on the contrary, this is usually encouraged as good defensive coding.

I always thought of the perl/Tk interface as melding very nicely with the rest of perl. The interface has a natural hierarchical, OO structure and after playing with some widgets, it is pretty easy to guess what is needed with new widgets. It does what I mean.

That said, I can see room for improvement. Tk has always been beautiful enough for me, but I recognize that others are more sensitive to GUI fashions. For instance, it would be nice for Tk widgets to be more easily skinnable, in the fashion of GNOME or KDE widgets.

Update: I forgot to mention that the Tab key allows keyboard traversal of widgets in a window.

-Mark


In reply to Re: Is there a really perlish user interface module, or something? by kvale
in thread Is there a really perlish user interface module, or something? by Shenpen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.