Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error event does no return to master
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01561811
Message ID:
01561917
Views:
49
>Not sure how that works with Ignore. I might give it a try, although it does not use the Error event at all.

It will be tricky as it could have failed in any of the probably many lines of code that you have in the Load, and then the error will carry forward, for example if the error was "table not found" in an "use" statement, any subsequent command against said table will fail, and not only in the load but everywhere, furthermore the lines of code after the line that produced the error will not be executed at all, which will cascade errors. You could maybe have more than one TRY CATCH structure to determine "Fatal" vs "non Fatal" errors, allowing to ignore only the latter ones. Anyways, if is not fatal you can just change the way you initialize the llSuccess variable, you initialize it to .T. and then set it to .F. only for fatal errors.

>Actally, the double refresh() was/is the solution to another problem. I got that solution from here on the UT.

I read your other post and see the reason, if it works then it works...

>
>The loWindow code was not well edited by me below. In my original code it is loWindow[m.ln]=etc. I removed the array part for here, but forgot to remove it from the rest of the lines.

I guessed so, I did not see the array part in my first read either, so I see how could you forgot about them too :)

>
>Btw, the IF VARTYPE line requires an additional test of AND NOT ISNULL(loWindow).

I think that if the form is not initialized the variable will always be false, I did a quick test now and it is assigned to loForm if the form is not created:
clear
clear all
loForm		= null
loForm		= NewObject('myForm')
? loForm, Vartype(loForm)

define class myForm as Form
	function init() as Boolean
		return .f.
	endfunc
enddefine
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform