Re: doEvents(0) only processing 1 event?
- Posted by "Derek Parnell" <ddparnell at bigpond.com> Jan 08, 2004
- 337 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