gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Using queues to store parameters for parameterized fu


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Using queues to store parameters for parameterized functions put on wxCallAfter queue.
Date: Thu, 9 Dec 2004 21:23:44 +0100
User-agent: Mutt/1.3.22.1i

> I think the bug was in using wxCallAfter.  I used wxCallAfter because I 
> found changing the tree from within an event handler caused core dumps.
Strange. That *should* work, one would suspect ...

> But the functions that have to be called from wxCallAfter need 
> parameters,  so the solution
> seemed to be  to queue the parameters as well.
Nope. CallAfter takes arguments which it then passes to the
first argument as arguments to that function call ... No need
for queuing.

> Previously , the node was created outside of wxCallAfter, and the event 
> handlers to delete it if it wasn't used during edit mode , was
> added from within wxCallAfter. So rapid clicking could move the node 
> from edit mode, to saved mode, before
> the event handlers could be added later in wxCallAfter, and adding the 
> event handlers when the node was already saved
> with the default label was too late.
> 
> Isn't that an interesting bug ? :-)
Nice catch. But the solution should be far easier than
explicitely using the Queue module (see above).

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]