Information générale
Catégorie:
Codage, syntaxe et commandes
Errors follow the call stack and not containership. In other words if the error occurred in a textbox on your form it will fire the textbox error event and if no code is there follow its class roots (class hierarcy) not its parent roots (containership hierarchy). At the first place it finds code in the Error Event that code will begin handling the error. This means it will travel up to the VFP Base Class via inheritance. Doug Hennig has an excellent example available on stonefields site in the public section. His work that appreared in FoxTalk is also available via MSDN online. Anyways you have to call the form's error event directly or with This.Parent.Error to call up the containership chain.
You said the error occurred in the form's "child method". If you mean a method of the form then the form error event should fire. BTW, if no Error code exists in any error events of the call stack your ON ERROR routine will fire if there is one or you will get the default VFP error dialog.
HTH
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement