Before trying to access the object oentorno verify that object exists, e.g.
if vartype(oentorno) = 'O'
do our processing
else
endif
And also try to capture the call stack with aStackInfo in the Destroy() of the class for oenTorno.
Also, are you sure that AENTORNO array exists in your object ?
>Hi friends:
>
>I have a few systems working in VFP 9.0 and there are not many problems
>
>But...
>
>From time to time an inexplicable error appears.
>
>I mention this for example only:
>
>At start I create an object named "oentorno" where I save "SETs" for restoring them before finish the system.
>
>Suddenly an instruction as "SELECT CCOSTOS" (a cursor) provokes an error.
>
>There's not a logical (for my humble level) reason for that error.
>
>Error events executes and tries to open a table to register the error.
>
>When I open every table I use a routine (in a PRG file) having this instruction:
>
>USE (OENTORNO.AENTORNO(17)+'FILES') IN 0
>
>Another error appears:
>
>"Object OENTORNO not found"
>
>I know there are many experts among you, friends. Please remember when you were babys (as me) programing perhaps you encountered this kind of errors and you can explain me
>
>I must say the 99% of times error events works well, I find the reason and I fix it up.
>
>But I'm really upset when I can't tell my clients: "I've made a mistake" because the same program I executes n times at n+x explodes..
>
>I thank you very much in advance for your time.
>
> Héctor
If it's not broken, fix it until it is.
My Blog