FranklinYeung
Programmer
Hi all,
I am developing an error routine procedure, except on the main program to execute
ON ERROR Do sys(5)+curdir()+program\myerr.prg with error(), message(), message(1), program(), lineno(), date()
I am now considering another method such that any error hit in the form's controls (text box, combo box, grid, etc..)
will fire the form's error routine first,
but what should i code on the form's init function?
Can I write the following statement in the Form's init function in order to capture all form's contorls' error
ON Error Do this.error with error(), program(), lineno()
Or i need to code every controls' error rounte in the following way?
Command1.error()
LPARAMETERS nError, cMethod, nLine
this.parent.error(nError, cMethod, nLine)
TextBox1.error()
LPARAMETERS nError, cMethod, nLine
this.parent.error(nError, cMethod, nLine)
Any better solution so that the form's error route would fired first?
Many thanks
Franklin

I am developing an error routine procedure, except on the main program to execute
ON ERROR Do sys(5)+curdir()+program\myerr.prg with error(), message(), message(1), program(), lineno(), date()
I am now considering another method such that any error hit in the form's controls (text box, combo box, grid, etc..)
will fire the form's error routine first,
but what should i code on the form's init function?
Can I write the following statement in the Form's init function in order to capture all form's contorls' error
ON Error Do this.error with error(), program(), lineno()
Or i need to code every controls' error rounte in the following way?
Command1.error()
LPARAMETERS nError, cMethod, nLine
this.parent.error(nError, cMethod, nLine)
TextBox1.error()
LPARAMETERS nError, cMethod, nLine
this.parent.error(nError, cMethod, nLine)
Any better solution so that the form's error route would fired first?
Many thanks
Franklin