Re: refresh+update on macosx

Erik Colson <[email protected]>
Newsgroups gmane.comp.lang.perl.wxperl
Message-ID <[email protected]>
Erik Colson <[email protected]> writes:

> Steve Cookson - gmail <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.