Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid needs delay to display properly. Why?
Message
From
27/11/2000 07:12:57
 
 
To
15/11/2000 16:58:18
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00442349
Message ID:
00445593
Views:
22
Hi!

If your code making a lot of updates to the visual controls, Widnows Events Queue for your application (for VFP) may be corrupted or contains so much events that they don't work properly. This is the main cause of many refreshing problems. And this very depends on available memory, application code, Windows version etc etc.
WAIT TIMEOUT don't help because it doesn't suspend application to the level when it can process all pending events.
To solve this problem, just put DOEVENTS command before do form instead of application suspending. DOEVENTS will complete processing of all pending events exactly like you suspend application and run it again.
Finally, you may try to use _VFP.AutoYield setting to allow events processing between VFP commands, this will also help to reduce number of pending events and number events conflicts.

>if I
>
>"do form gridpop with (a bunch of parameters)"
>
>intended to give me a popup of all available stock items...
>
>the first time in each "session" that I do this, instead of showing me the full stock list, the grid displays either no records (if none has yet been added to the sales order I'm in) or just the one record (corresponding to the foreign value of the record I'm on). There are no filters in operation, table relationships are OK and the procedure works in 50 other similar situations.
>
>Trying to debug this, I put a "suspend" in front of the "do form" so I could watch what happened.
>
>Nothing happened. i.e. the problem went away.
>
>i.e. Even if, as soon as it "suspends" I then hit the F5 key to let it resume, instead of the above, the subsequent behaviour is exactly what I'm trying to get in the first place (a full display of available codes).
>
>I got the same (correct) result by putting
>
>WAIT 'Press any key to see the Stock Popup...'
>
>where the "suspend" used to be.
>
>whereas, if I try WAIT TIMEOUT (anything)
>it doesn't work. Its as though it needs to actually stop processing and then continue. A mere timeout of anything up to 10 seconds doesn't do the job.
>
>What can it be waiting for? and why or how would whatever its waiting for cause a restricted display?
>
>As I say, I use the same popup format in about 50 different places, so I'm very familiar with what works and what doesn't. Aint nutt'n obviously or significantly different in this case.
>
>Can anyone light my way?
>
>Harry
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform