Tie::Tk::Text

Access Tk text widgets as arrays
Download

Tie::Tk::Text Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Michael Carman
  • Publisher web site:
  • http://search.cpan.org/~pjcj/

Tie::Tk::Text Tags


Tie::Tk::Text Description

Access Tk text widgets as arrays Tie::Tk::Text is a Perl module that defines a class for tie()ing Tk text widgets to an array, allowing them to be accessed as if they were an array of lines.It's not expected that anyone will actually want to populate and manipulate their text widgets this way, though you are of course free to do so. This module was created to make text widgets accessible to functions that expect an array reference as their input. (e.g. Algorithm::Diff::sdiff) You can do that with read-only support (FETCH and FETCHSIZE). All of the methods (PUSH, POP, STORE, etc.) are included for completeness.Note: This documentation refers to "Tk text" widgets rather than "Tk::Text" ones. That's because it supports anything that uses the same API as a Tk text widget. It works with Perl/Tk and Tkx and should work with Tcl::Tk as well.SYNOPSIS use Tie::Tk::Text; my $w = $mw->Text()->pack(); tie my @text, 'Tie::Tk::Text', $w; $w->insert('end', "foo\nbar\nbaz\n"); print $text; # "bar\n" Requirements: · Perl


Tie::Tk::Text Related Software