From: Frazier, J. J. <Joe...@Pe...> - 2002-05-28 14:57:11
|
Change=20 my $void =3D $win->DoEvents(); =20 to : Win32::GUI::DoEvents(); =20 This is a class method, not an instance method. Also, this is just a = straight method call, no arguments or assignment back to a variable is = needed. I can ONLY assume that the problem is that the DoEvents method = is looking for a class method being passed in, and since it gets an = object, it does not assign whatever variable it needs inside the sub.... = Or maybe not. I dont know. Anyway, use the second form and not the = first. 8>) =20 Joe Frazier, Jr.=20 -----Original Message----- From: FARRINGTON, RYAN [mailto:rya...@ci...] Sent: Tuesday, May 28, 2002 10:15 AM To: 'per...@li...' Subject: RE: [perl-win32-gui-users] eek! =3D) here is a sample break from the code.... starts on line 162 ends on line = 185. =20 sub ::btnOpen_Click { defined(my $win =3D $Win32::GUI::Loft::window{winFileDisplay}) or = return(1); my %file1 =3D $win->tvwTreeView()->ItemInfo( = $win->tvwTreeView->SelectedItem() ) or return(1); my $file =3D $file1{'-text'}; $interface->execute('check_server', "$file"); until($interface->get_state eq 'fin') { my $void =3D $win->DoEvents(); $win->pbProgressBar()->StepIt(); sleep(1); } $win->pbProgressBar()->SetPos(0); my @return_value =3D $interface->get_retval; my $msg =3D ""; foreach my $line (@return_value){ $msg =3D $msg . $line; } $win->reFileSelected()->Text($msg); =20 return(1); } -----Original Message----- From: FARRINGTON, RYAN [mailto:rya...@ci...] Sent: Tuesday, May 28, 2002 8:48 AM To: 'per...@li...' Subject: [perl-win32-gui-users] eek! =3D) Using Win32::GUI and I'm having a problem with the program reporting to = windows that it is not responding. I know that it is because of the loop = I have the program in but I still want the user to work while I'm = processing in the background. I found a reference to $win->DoEvents() = but as far as I can see that works but it errors out with "Use of = uninitialized value in subroutine entry at hotfix.pl line 172" Gah =3D( = I'm starting to hate this... I've looked at the archives but no search = sucks =3D) Anyone have any ideas? |