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 =( I'm starting to hate this... I've looked at the archives but no search sucks =) Anyone have any ideas?

Yup, I see this in my own scripts. From what I understand, it's equivalent to Win32::GUI saying "hey! there are no events for me to respond to". I've done the requisite searching, .pm looking, and so forth, and the only non-destructive way I stopped the error was to add the following to my script:

  # override the warning signal, which
  # will stop thousands of DoEvent warnings
  # happening under Win32::GUI.
  BEGIN { $SIG{'__WARN__'} = sub {
     warn $_[0] unless (caller())[0] =~ /Win/; } }

Which basically says to ignore any warnings that the Win32 libraries pass off to your script. Of course, you'd only want to do this once you're sure that your code is working perfectly and flags no other warnings.



--
Morbus Iff ( i'm the droid you're looking for )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Tech: http://www.oreillynet.com/pub/au/779 - articles and weblog
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus


Reply via email to