>Does anyone know why only sometimes, maybe 1 out of 100 times I'll get the above error message in my shutdown procedure?
>
>
procedure CloseForms
>local i
>
>for i = _screen.FormCount to 1 step -1
> if ( _screen.Forms[i].QueryUnload() )
> _screen.Forms[i].Release()
> else
> _screen.Forms[i].Activate()
> endif
>endfor</b>
>
>None of the forms in the app ever return .f. from QueryUnload()
>
>df
What if Forms are released, then the _Screen:Forms[] array would still keep the pointer but the form object would be a null value. This happens (I think) when you release a form that is not the last that was created.
I think.
But it is easy to find a way around that: if type(_... (spare me the typing please)°<>"O" or testing the .null. value.
Marc
If things have the tendency to go your way, do not worry. It won't last. Jules Renard.