Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to re-create all columns in grid
Message
From
24/09/2001 11:40:38
 
 
To
21/09/2001 18:21:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00556193
Message ID:
00560030
Views:
29
OIC, so it was supposed to C5 on me sometime during thise 120 F3s? It didn't.

>>I downloaded from your link and I get a demo which runs psychotically without allowing any input whatsoever. Try again?
>>
>
>We're still trying to catch when it happens and when it doesn't. The flashing happens because he stuffs 120 times F3 in the keyboard buffer which then triggers the menu to cal the _screen.activeform.f3 to rebuild the grid - 120 times. When I tried it with the .exe, it C5'd after just a few (between 3 and 12) times.
>
>Later Andrus sent me the code, and the things started to differ. I was able to reproduce the C5 after just a few hits on the F3 (manually, I removed the keyboard stuffing), but there was a button on the form itself, which ran the same method (rebuild the grid) and I was able to run it from the button dozens of times. After that, just a few times on F3 and I got a C5 again.
>
>My prime suspect is the combination of the call via _screen.activeform.method and the destroying of columns when there's a combo in one of them. Andrus said that this works when there's no combo.
>
>The version which eventually worked (I've held F3 pressed for half a minute, and it kept rebuilding the grid for good couple of minutes afterwards) was to stuff the code in form's .keypress and forget about the menu; Andrus has also created a solution of a temporary timer object in _screen which receives a reference to the form, waits for a wait state (.interval=1), and then runs the rebuildgrid method in the form and commits harakiri afterwards. This way the code is not run directly from _screen.activeobject, but rather delegated to a separate object which holds a reference to the form received from the form itself.
>
>Somehow, this gives VFP a break and then it works without a C5.
>
>I think this pretty much sums it up.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform