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?

***** Start of Included Code *****
   * 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
***** End of Included Code *****

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to