Skip to Main Content
Learning Perl/Tk
book

Learning Perl/Tk

by Nancy Walsh
January 1999
Beginner content levelBeginner
373 pages
9h 43m
English
O'Reilly Media, Inc.
Content preview from Learning Perl/Tk

8.18. Internal Debug Flag

The debug function takes an optional boolean argument:

$text->debug( [ boolean ] );

If the value passed in is true, then internal consistency checks will be turned on in the B-tree code associated with text widgets. If false, the checks will be left off. Without any argument, the debug method will return the value "on" if it has been turned on, and "off" if not. All text widgets in the application share the same debug flag.

8.18.1. Scanning

The scanMark and scanDragto methods are used internally within the text widget. A call to scanMark simply records the x, y passed in for use later with scanDragto. It returns an empty string:

$text->scanMark(x, y);

scanDragto also takes x, y coordinates, which are compared to the scanMark x,y coordinates. The view within the text widget is adjusted by 10 times the difference between the coordinates.

$text->scanDragto(x, y);
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Perl/Tk

Mastering Perl/Tk

Stephen Lidie, Nancy Walsh

Publisher Resources

ISBN: 1565923146Supplemental ContentCatalog PageErrata