Subject: | vptk_w.pl - Can't call method "Subwidget" on an undefined value |
Date: | Thu, 30 Oct 2008 11:00:00 -0400 |
To: | <bug-vptk_w [...] rt.cpan.org> |
From: | "Hubert Talbot" <Hubert.Talbot [...] criq.qc.ca> |
- Windows XP SP3
- perl 5.8.8 (ActivePerl)
- vptk 2.38
- Debian Gnu/Linux 2.6.25-2-686
- perl 5.10.0
- vptk 2.38
Hi,
When I run vptk_w.pl from Windows, everything works well.
However, from Linux, vptk_w.pl reports this error:
Can't call method "Subwidget" on an undefined value at /usr/lib/perl5/Tk/Widget.pm line 779.
This comes from vptk\vptk_w\EditorServices.pm, line 31 (call to RecolorTree function
from SetMainPalette function).
In /usr/lib/perl5/Tk/Widget.pm line 779 (RecolorTree function), there is a call
with $Tk::___tk_set_palette that seems to be assigned only in setPalette function at line 728.
setPalette is not called before the call to RecolorTree in SetMainPalette from EditorServices.pm.
Adding a call to setPalette function before line 31 in EditorServices.pm (RecolorTree function) fixes the problem.
$mw->setPalette('background', $bg_color);
HTH
Hubert