|
From: Kevin M. <kej...@ho...> - 2010-05-04 04:02:14
|
Ramakanta,
I'm not sure what you are trying to do here:
sub Loop_Click {
print "Loop clicked \n";
$win ->( -activate => (1)); #<==========
my $thr2 = threads->create( \&thread2);
$res =$thr2->join();
print "hello $res\n";
};
__END__
I think you meant:
sub Loop_Click {
print "Loop clicked \n";
$win->Animate( -activate => (1)); #<==========
# you could use $win->Show() instead
my $thr2 = threads->create( \&thread2);
$res =$thr2->join();
print "hello $res\n";
};
__END__
Also, in the file 'rama.pl', you haven't incremented $i, so it loops indefinitely and never returns. Change it to something like this:
$i=0;
while ( $i++ < 5 ) #<======
#or even for(1..5)
{
print" hi ramakanta\n";
sleep 5;
}
__END__
You program will still block until this script completes, which means the windows will not respond until then. You will need to somehow call DoEvents() while this script is running.
Hope this helps,
Kevin.
_________________________________________________________________
Browse profiles for FREE! Meet local singles online.
http://clk.atdmt.com/NMN/go/150855801/direct/01/ |