Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class error handling
Message
From
19/01/2004 05:59:00
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
 
 
To
19/01/2004 05:43:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00868040
Message ID:
00868063
Views:
13
Hi Fabio
Works with programs.
It gaves me 'Syntax Error' if executed from a object method - form.button.click()

If I use external variables, the encapsulation is gone :( .
Just hoped to have this utility class to take care of itself, even for errors.

Thanks


>Hi Dorin,
>
>if this can help you.
>
>
>CLEAR
>WITH CREATEOBJECT("textbox1")
> ExternalCall()
>ENDWITH
>
>DEFINE CLASS textbox1 AS textbox
>	PROCEDURE myProc
>		X=X+1   && BAD LINE
>		? "I DONNOT WANT SEE THIS"
>	ENDPROC
>	
>	PROCEDURE Error
>		LPARAMETERS nError, cMethod, nLine
>		? "INTERCEPT ERROR"
>		cprogram=PROGRAM(PROGRAM(-1)-2)
>		RETURN TO &cprogram	
>                * It does not have sense,
>                * but unfortunally is not possible return a value ( use a external private var ) !!!!
>	ENDPROC
>ENDDEFINE
>
>PROCEDURE ExternalCall
>	? .myProc()
>	? "NEXT LINE"
>ENDPROC
>
>
>Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform