in reply to Re: Application Not Responding
in thread Application Not Responding

As all you need is an indication of when the task is finished, you can fork a subprocess and write the file from there leaving the parent process to maintain the gui and report when the background process has completed.

This works fine under AS 5.6.1 and 5.8, whether PerlApp can handle it I have no experience.


..and remember there are a lot of things monks are supposed to be but lazy is not one of them

Examine what is said, not who speaks.
1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
3) Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clarke.

Replies are listed 'Best First'.
One solution
by arden (Curate) on Mar 14, 2003 at 16:14 UTC
    Thanks all for your help. I've gotten around my problem for this particular case by delving deep into other people's modules. Basically, I re-wrote the Archive::Zip module so that I could pass it two new variables ($window_handle & $percent_done_reference). Then, after every chunk of data is written out to file, I redo the math for percentage done $$percent_done_reference = 100*($total_size - $self->_readDataRemaining)/$total_size; and then update the window $window_handle->update();. The update happens often enough that my program very rarely falls into "Not Responding" status. I happen to also be using the $percent_done variable in a progress bar. :)

    Again, thanks for the help!
    Arden

      Have you contacted the author to offer your patch? I'm sure you're not the only one to run into this (or a similar) problem.

      ------
      We are the carpenters and bricklayers of the Information Age.

      Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

      Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

        I sent an email to the author of Archive::Zip a while back but never received a response. I'm intending to try again, after I polish things up a bit. I still need to look through my Zip.pm and find all of my changes and erase my error-checking code.