aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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};