Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting a validation failure of child by grandparent c
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01092783
Message ID:
01092840
Vues:
22
Hi Naomi

>I made a slight modification in that code. If dodefault returned true you don't need to get lcErrorMsg.

Thanks. I will update it accordingly.

>But I don't see other problems and it looks like you're correct. The only other suggestion would be to move textbox validation to a form's custom method and call it in BeforeSave instead of drill-down textbox validation.

I guess I was not able to explain my problem. CodeBook has the following (puesdo) code:

cForm.Save()
IF NOT THIS.BeforeSave()
   RETURN
ENDIF

*** save stuff here

THIS.AfterSave()
iForm.Save() does not have anything but iForm.BeforeSave() has the code you have seen, this is the one I have put in for my usage. But all of this is form code, yes I am validating key things in the MyForm.BeforeSave() but when I return a false, essentially cForm is doing a simple return without messaging. My code in iForm() does the messaging but I presume it will only message cForm problems. Actually I want to message MyForm generically in iForm.

Any advice on how to modify iForm.Save() or iForm.BeforeSave() without modifying the framework code in cForm?

Please advise.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform