aboutsummaryrefslogtreecommitdiff
path: root/Perl/Zinc
diff options
context:
space:
mode:
authoretienne2003-03-07 14:21:02 +0000
committeretienne2003-03-07 14:21:02 +0000
commita10fdf00213ca14ff4bc02b3425436a192f74773 (patch)
tree662077fd08c5d2aac3c6f8cabf77c29e7fb2ffbc /Perl/Zinc
parent550fafa93e6a6293f40234ca7fdafbf3d916add4 (diff)
downloadtkzinc-a10fdf00213ca14ff4bc02b3425436a192f74773.zip
tkzinc-a10fdf00213ca14ff4bc02b3425436a192f74773.tar.gz
tkzinc-a10fdf00213ca14ff4bc02b3425436a192f74773.tar.bz2
tkzinc-a10fdf00213ca14ff4bc02b3425436a192f74773.tar.xz
ZincDebug.pm
Diffstat (limited to 'Perl/Zinc')
-rw-r--r--Perl/Zinc/Debug.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/Perl/Zinc/Debug.pm b/Perl/Zinc/Debug.pm
index ce853a9..bc3dcfc 100644
--- a/Perl/Zinc/Debug.pm
+++ b/Perl/Zinc/Debug.pm
@@ -51,7 +51,7 @@ my %focus;
my %instances;
my @instances;
my %cmdoptions;
-
+my $initobjectfunction;
sub BEGIN {
# test if ZincDebug is loaded using the -M perl option
$preload = 1 if (caller(2))[2] == 0;
@@ -63,6 +63,9 @@ sub BEGIN {
'color=s', 'enclosedModBtn=s', 'overlapModBtn=s', 'searchKey=s',
'skey=s', 'verbosity=s', 'basename=s',
);
+ # save current Tk::Zinc::InitObject function; it will be invoked in
+ # overloaded one (see below)
+ $initobjectfunction = \&Tk::Zinc::InitObject;
}
@@ -70,6 +73,9 @@ sub BEGIN {
# Note that created bindings might be overloaded by the application.
sub Tk::Zinc::InitObject {
Tk::Widget::InitObject(@_);
+ # invoke function possibly overloaded in other modules
+ &$initobjectfunction;
+ #print "***** ZincDebug Tk::Zinc::InitObject zinc=$_[0]\n";
return unless $preload;
my $zinc = $_[0];
my @options = ();
@@ -80,7 +86,7 @@ sub Tk::Zinc::InitObject {
if $cmdoptions{optionsToDisplay};
push (@options, -optionsFormat => $cmdoptions{optionsFormat})
if $cmdoptions{optionsFormat};
- print "options=@options\n";
+ #print "options=@options\n";
&tree($zinc, @options);
@options = ();
push (@options, -color => $cmdoptions{color}) if $cmdoptions{color};