Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form closing event sequence Vs RETURN
Message
From
05/12/2010 14:35:38
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01491739
Message ID:
01491806
Views:
44
I call object events all the time.
The most common one is to have several different methods call the click event on the Close Command Button which closes the form and does some other housekeeping.

What isn't that a good idea, Sergey?

.



>>You shouldn't call object events. If you need to execute code from different places move it to a form method.

>
>I am aware of form closing event sequence Release->Destroy->Unload, when codes calls form.release() programmatically.
>
>I did a simple test which involves several command buttons. When I click button1, it calls button2.Click() and button2.Click() calls button3.Click()... till buttonN, where it simply runs THISFORM.Release() at the end.
>
>And I notice that if THISFORM.Release() is executed in a method at N level of call stack, then the next event Destroy will only be started after the call stack is cleared (i.e.it has to first RETURN N times to the button1 before the closing event sequence continues).
>
>Is my test observation correct and always true?
>Anyone knows of any exception to the above?

--sb--
VFP Tips, tricks and code
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform