Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 To: Gene Wirchenko
  Where is Gene Wirchenko?
 Kamloops
 Canada
 Gene Wirchenko
 Tags
Subject: RE: clear events
Thread ID: 395882 Message ID: 395883 # Views: 70 # Ratings: 3
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Monday, January 20, 2014 11:59:51 PM         
   


My understanding as per Help is CLEAR EVENTS simply cancels the "immobile / wait-state for events" called for by READ EVENTS. Once the "immobile/wait" instruction is cancelled the execution continues to whatever there are instructed to do thereafter. RETURN on the other hand sends-back / returns execution to calling procedure/function.

Regards,
David



>Dear Vixens and Reynards:
>
> My understanding of clear events is that it functions as a sort of return statement. The docs state that, too.
>
> I have a test program where in a QueryUnload, I have a clear events statement. Because I already seen some weird event orders with grids, I have been tracking events more than usually. In this case, execution continues past the clear events statement. The should-not-happen message gets printed. This does not result in an error, but why is it happening?
>
>
>    * queryunload
>    * queryunload
>    * Last Modification: 2014-01-16
> 
>    procedure queryunload
> 
> #if PRINTDEBUG or PRINTDEBUGMETHOD or PRINTDEBUGTMP
> activate screen
> ? "QueryUnload starting"
> #endif
> 
>       * If there was a validation error, do not allow the form to close.
>       * Possibly, this could have a query of whether to abandon changes.
>       if type("this.griderror")#T_U
>          if this.griderror
>             nodefault
>             return
>             endif
>          endif
> 
>       =tablerevert()
>       use in testdata     &&***** hardcoded grid table
> 
> #if PRINTDEBUG or PRINTDEBUGMETHOD or PRINTDEBUGTMP
> activate screen
> ? "QueryUnload about to end (just before clear events)"
> #endif
> 
>       clear events
> 
> #if PRINTDEBUG or PRINTDEBUGMETHOD or PRINTDEBUGTMP
> activate screen
> ? "QueryUnload ending (after clear events - should NOT happen)"
> #endif
> 
>       return
> 
>       endproc
> 

>
> Sincerely,
>
> Gene Wirchenko

ENTIRE THREAD

clear events Posted by Gene Wirchenko @ 1/20/2014 11:44:20 PM
RE: clear events Posted by David Mustakim @ 1/20/2014 11:59:51 PM
RE: clear events Posted by Gene Wirchenko @ 1/21/2014 6:36:20 PM
RE: clear events Posted by David Mustakim @ 1/21/2014 8:52:02 PM
RE: clear events Posted by Stefan Wuebbe @ 1/21/2014 7:10:37 AM
RE: clear events Posted by Gene Wirchenko @ 1/21/2014 6:34:10 PM
RE: clear events Posted by Stefan Wuebbe @ 1/21/2014 9:13:41 PM