NAME
Tk::ObjScanner - Tk composite widget object scanner
SYNOPSIS
use Tk::ObjScanner;
my $scanner = $mw->ObjScanner( caller => $object,
[title=>"windows"]) -> pack ;
DESCRIPTION
The scanner provide a GUI to scan the attributes of an object. It can also be used to scan the elements of a hash or an array.
The scanner is a composite widget made of a Tk::HList and a text window (actually a TK::ROText). This widget acts as a scanner to the object (or hash ref) passed with the 'caller' parameter. The scanner will retrieve all keys of the hash/object and insert them in the HList.
When the user double clicks on a key, the corresponding value will be added in the HList.
If the value is a scalar, the scalar will be displayed in the text window. (Which is handy if the value is a multi-line string)
Constructor parameters
caller: The ref of the object or hash or array to scan (mandatory).
title: the title of the menu created by the scanner (optionnal)
destroyable: If set, a menu entry will allow the user to deatroy the scanner widget. (optional, default 1) . You may want to set this parameter to 0 if the destroy can be managed by a higher level object.
WIDGET-SPECIFIC METHODS
updateListBox
Update the keys of the listbox. This method may be handy if the scanned object wants to update the listbox of the scanner when the scanned object gets new attributes.
CAVEATS
ObjScanner may fail if an object involves a lot of internal perl magic. In this case, I'd be glad to hear about and I'll try to fix the problem.
ObjScanner does not detect recursive data structures. It will just keep on displaying the tree until the user gets tired of clicking on the HList items.
AUTHOR
Dominique Dumont, Dominique_Dumont@grenoble.hp.com
Copyright (c) 1997-1999 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
perl(1), Tk(3), Tk::HList(3)