Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
On Error...Ok in VFP6 not in VFP7
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00551946
Message ID:
00552927
Vues:
19
Our forms are subclassed from our custom set of classes. In the main program, I have that ON ERROR.. line of code. The errtrap is a separate program.

TA
>>It works modular but if error is inside the form, it does not. I don't know why?
>>
>>The errtrap program is successfully invoked but parameters are always .F.
>< SNIP >
>
>Hi Jess,
>
>Works for me. Below's my test code. Can you post your code that reproduces the problem?
>ON ERROR DO ERRTRAP WITH ERROR(), PROGRAM(), LINENO()
>
>PUBLIC oform1
>
>oform1=NEWOBJECT("form1")
>oform1.Show
>
>RETURN
>
>PROCEDURE ERRTRAP (nErrorNo, cProgram, nLineNo)
>
>cMsg = "Error number : "+ALLTRIM(STR(nErrorNo))+CHR(13)+;
>       "Origin       : "+cProgram+CHR(13)+;
>       "Description  : "+MESSAGE()+CHR(13)+;
>       "Line number  : "+ALLTRIM(STR(nLineNo))
>
>Wait WINDOW cMsg
>
>RETURN
>
>DEFINE CLASS form1 AS form
>
>
>	DoCreate = .T.
>	Caption = "Form1"
>	Name = "Form1"
>
>	ADD OBJECT command1 AS commandbutton WITH ;
>		Top = 204, ;
>		Left = 54, ;
>		Height = 27, ;
>		Width = 84, ;
>		Caption = "Command1", ;
>		Name = "Command1"
>
>	PROCEDURE command1.Click
>
>		a = b
>	ENDPROC
>
>ENDDEFINE
>
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform