1. doEvents(0) only processing 1 event?
- Posted by CoJaBo <cojabo at suscom.net> Jan 08, 2004
- 349 views
doEvents(0) in Win32Lib seems to only be processing 1 event per call, so repainting an entire window during a slow loop takes a very long time to complete. Is this supposed to happen? and how do I fix it?
2. Re: doEvents(0) only processing 1 event?
- Posted by "danielmoyer" <danielmoyer at prodigy.net> Jan 08, 2004
- 347 views
Maybe find out what's making the loop slow & put more doEvents(0)? ie, if you have a loop with successive sub-loops, put doEvents(0) inside the next innermost loop, etc, until you strike a balance between getting the window redrawn in a timely manner & slowing the loop down too much. Dan Moyer ----- Original Message ----- From: "CoJaBo" <cojabo at suscom.net> To: <EUforum at topica.com> Subject: doEvents(0) only processing 1 event? > > > doEvents(0) in Win32Lib seems to only be processing 1 event per call, so > repainting an entire window during a slow loop takes a very long time to > complete. Is this supposed to happen? and how do I fix it? > > > > TOPICA - Start your own email discussion group. FREE! >
3. Re: doEvents(0) only processing 1 event?
- Posted by "Derek Parnell" <ddparnell at bigpond.com> Jan 08, 2004
- 338 views
----- Original Message ----- From: "CoJaBo" <cojabo at suscom.net> To: <EUforum at topica.com> Subject: doEvents(0) only processing 1 event? > > > doEvents(0) in Win32Lib seems to only be processing 1 event per call, so > repainting an entire window during a slow loop takes a very long time to > complete. Is this supposed to happen? and how do I fix it? > I'm not sure what you mean by "a slow loop". doEvents(0) services all events that are in the queue waiting for some action. What you may be experiencing is a paint event occuring while you are in the paint event handler. I thought I'd made provision for that inside the library but maybe not. Try adding logic like this ... integer InPaint InPaint = 0 procedure Paint_Window(integer self, integer event, sequence parms) if InPaint then return end if InPaint = 1 . . . . . . while .... do doEvents(0) . . . end while . . . InPaint = 0 end procedure -- Derek