Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening and closing forms - Foxie is a bit too fast ...
Message
From
03/10/1997 12:16:31
 
 
To
03/10/1997 11:13:13
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00053023
Message ID:
00053094
Views:
22
>Hi Francois!
>
>You can save your form as class and use the following code:
>
>loForm=createobj([waitform])
>loForm.Show()
>=sqlexec(blah blah blah)
>loForm.release()
>
>>In the first example
>>
>>do form MyPleaseWaitForm &&
>>sqlexec(myconnection,"select * from ...)
>>
>>Fox does start the SQLEXEC command before completing FORM OPENING.
>>The form is only completed once the SQLEXEC is finished ! not nice*


Hi Vlad,

I take your point. I tested it. But the problem still occurs if you use class instanciation rather than forms.

From my experience what happens indeed when you do a FORM Show() :

1 - Fox shows the frame of the form (whether VCX or SCX)
2 - goes on with the rest of the fox code,
3 - in PARALLEL to step 2 goest its own way loading the controls.

VFP uses that trick to improve form-rendering. You hardly notice it. When that code is pure VFP grammar, that generally works pretty fine.

But in some situation line1 completion of code should be guaranteed before you step into line2.

When that line2 is a blocking async SQLEXEC you need to resort to tricks if you want your UserPleaseWaitForm.show() to show before the async SQLEXEC is finished (not only the frame but all controls).

I did insert =INKEY(1). I am really unsatisfied with the solution but sometimes turning fox around is the only way.

If anyone ran into equivalent difficulties : fox being kind of too fast, i'd be glad to share experience!


Regard
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform