Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Defensive programming...
Message
De
06/06/2002 15:36:26
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00665394
Message ID:
00665656
Vues:
25
This message has been marked as the solution to the initial question of the thread.
>Thanks - returning .f. does the trick to a degree but I really want to clear events as well so that the program closes - it doesn't seem that clear events can be called in the load event of a form or it doesn't appear to be taken notice of! I step through my code and the return .f. brings me back to my read events command (even if I issue clear events just before return .f. Any ideas? and thanks again

If you have a calling routine, when you stop instantiation of the form you could set an oApp property or a global variable property to indicate the application shoudl be exited, then issue CLEAR EVENTS, e.g. in the form Init
IF THISFORM.CancelFormLoad
    oApp.ShutTheAppDown = .T.
    RETURN .F.
ENDIF
Then in the calling routine:
IF oApp.ShutTheAppDown
    ...   && Clean up etc.
    CLEAR EVENTS
ENDIF
Again you probably need to massage it for your scenario, but you get the idea.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform