Erik Colson <e...@ecocode.net> writes:

> Steve Cookson - gmail <steveco.1...@gmail.com> writes:
>
>> I had a similar case with updating a progress bar during a database
>> update.  The answer is $app->Yield();
>
> Hi Steve,
>
> That does the trick. Thanks !

Playing a little more with Yield. It seems that Yield allows the user to
click on buttons again, while the routine is still executing. So the
code produces an error:

perl(40521,0x7fff76d6a300) malloc: *** error for object 0x7fff5eb01280: pointer 
being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

So that tells I need to keep to track of the user interupting things or
something else, which might be more user friendly in most cases..

However, I figure in this usage I'd better split my routine and add the
loop as separate calls to a specific function. The calls would then be
trigered by adding them to the event loop.

best
-- 
erik colson

Reply via email to