"a consistent interface for all the Tk:: modules."

What is inconsistent here? I agree that it would be much better if they can add some examples here and there in Tk documents, so that we can reach the proper use more quickly. The entire Tk document is long but poor.

But your issue really does not point me to anything that is "inconsistent", but rather some sort of learning curve.

If you want me to point out the inconsistancy, I would say that they better support editModified() in widgets that are really similar to Tk::Text, for example Tk::Entry, but it does not.

use Tk; use Tk::Dialog; use warnings; use strict; my $MW = MainWindow->new(-title => "Tk::Text test", -width => 200, -height => 200); my $text = $MW->Entry( -width => 40); $text->pack(-side => 'top', -fill => 'both'); $text->bind( '<FocusOut>' => \&callback); my $text2 = $MW->Text(-height => 10, -width => 40, -wrap => 'word'); $text2->pack(-side => 'top', -fill => 'both'); MainLoop; sub callback { if ($text->editModified()) { $text->Dialog(-title=>"Modified",-text=>"\$text has been modif +ied")->Show();#or whatever you want $text->editModified(0); } }

In reply to Re^3: Using Tk::Text and '<<Modified>>' by pg
in thread Using Tk::Text and '<<Modified>>' by castaway

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.