From: John L. <jla...@gm...> - 2006-05-25 02:19:12
|
On 5/24/06, Leandro Motta Barros <lmb...@gm...> wrote: > Hello again! > > On 5/22/06, John Labenski <jla...@gm...> wrote: > > On 5/22/06, Leandro Motta Barros <lmb...@gm...> wrote: > > [...] > > > I found that the most recent snapshot that compiles cleanly is > > > 2006-05-19, so I compiled and installed it. Unfortunatelly, using this > > > 2006-05-19 snapshot, the IDLE events that I was handling in a window > > > are no longer being received :-( > > > > > > Is this a known bug? Is there a fix for it? If not, I can try to > > > create a simple example that shows the problem, so that solving it > > > becomes easier. > > > > It's news to me, a sample bit of code would help since the rest of the > > event system seems to work. Your platform and wxWidgets version might > > help too. > > So, here is a simple example that show the problem (at least here, with me): > http://stackedboxes.org/~lmb/Balaio/wxLuaIdle.zip > > It prints lots of "IDLEing..." messages to the terminal when linked > against the version I was using before (CVS 2006-04-14), but no longer > does this when using the CVS snapshot from 2006-05-19. > > Any clues? It is strange that it used to work and now doesn't, but in any case I think it's fixed. Previously the two parameter call to ConnectEvent tried to get the wxWindowID of the event object, but this is not how wxEvtHandler::Connect works, it just uses wxID_ANY. I have changed the code to reflect this, hopefully it won't break other things, but it's "correct" now. To fix your problem, simply use -1 or wxID_ANY as the first parameter until the next snapshot. Regards, John Labenski ps. using Idle events w/ RequestMore() like this is pretty ugly, try to see if you can find a better way to implement this... |