aroul
2009-11-10 14:57:58 UTC
Hi,
I am trying to learn perl tk. Any help to find the error in this code
greatly appreciated.
Running this code generates below error -
Can't call method "g_start" without a package or object reference at
progressbar.pl line 17.
#!/Perl/bin/perl -w
use strict;
use Tkx;
my $mw = Tkx::widget->new(".");
$mw->g_wm_title ("Title");
$mw->g_wm_geometry ("500x200+500+250");
my $progress = $mw->new_ttk__frame (-padding => "3 3 3 3", -relief =>
"flat");
$progress->g_grid (-column => 0, -row => 1, -sticky => "nwes");
my $pbar = $progress->new_ttk__progressbar (-orient => "horizontal", -
length => 200, -mode => "indeterminate")->g_grid (-column => 0, -row
=> 0, -sticky => "w");
$pbar->g_start();
#$pbar->g_stop();
Tkx::MainLoop()
regards
aroul.
I am trying to learn perl tk. Any help to find the error in this code
greatly appreciated.
Running this code generates below error -
Can't call method "g_start" without a package or object reference at
progressbar.pl line 17.
#!/Perl/bin/perl -w
use strict;
use Tkx;
my $mw = Tkx::widget->new(".");
$mw->g_wm_title ("Title");
$mw->g_wm_geometry ("500x200+500+250");
my $progress = $mw->new_ttk__frame (-padding => "3 3 3 3", -relief =>
"flat");
$progress->g_grid (-column => 0, -row => 1, -sticky => "nwes");
my $pbar = $progress->new_ttk__progressbar (-orient => "horizontal", -
length => 200, -mode => "indeterminate")->g_grid (-column => 0, -row
=> 0, -sticky => "w");
$pbar->g_start();
#$pbar->g_stop();
Tkx::MainLoop()
regards
aroul.