Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error in custom method: Nested proceedures.
Message
De
27/12/1999 09:35:44
John Murray
Health Research, Inc.
Albany, New York, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Error in custom method: Nested proceedures.
Divers
Thread ID:
00308745
Message ID:
00308745
Vues:
38
A co-worker is attempting to set up a method to do error checking on save for a VFP 5.0 Form. He is attempting to alter the wizzard class form to run the method, but is getting this error on save:

Mehtods and events cannot contain nested proceedures or custom classes.

Any ideas on how to make Fox Pro happy?

Here is the code:


function verifydata(blnerror)
verifydata = .f.
do case
case blnerror=.t.
if thisform.txtos.value =""
messagebox('Please enter the currently used operating system.',0+48,'Field Error')
return verifydata=.f.
exit
endif
case blnerror=.f.
endcase
if alltrim(thisform.txtdatesubmitted.value) = ""
set date to american, long
endif
if alltrim(thisform.txtlanme.value)=""
messagebox('Last Name must have a value.',0+48,'Field Error')
return verifydata=.f.
exit
endif
if alltrim(thisform.txtfname.value)=""
messagebox('First Name must have a value.',0+48,'Field Error')
return verifydata=.f.
exit
endif
if alltrim(thisform.txtphone.value)=""
messagebox('A telephone # must be entered.',0+48,'Field Error')
return verifydata=.f.
exit
endif
if thisform.cbosystem.text = ""
messagebox('A system type must be selected.',0+48,'Field Error')
return verifydata=.f.
exit
endif
if thisform.txtsysver.value=""
messagebox('Current system version must have a value.',0+48,'Field Error')
return verifydata=.f.
exit
endif
return verifydata=.t.
endfunc
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform