Harry,
I'm not sure FOR EACH is designed to work when you are removing the objects from the collection.
for i = _screen.FormCount to 1 step -1
if ( _screen.Forms[i].QueryUnload() )
_screen.Forms[i].Release()
endif
endfor
You can also use the array version and just always release the [1] element.
>anyone got a clue what that means?
>
>I get it during my cleanup routine as it executes the second line of:
>
>FOR EACH oForm in _VFP.Forms
> oForm.Release()
>ENDFOR
>
>
>but I don't know how to get the debugger to tell me which form is causing the problem.
>"oForm" just returns "Object"
>
>It only happens if I quit the app from the latest form I'm designing. However, I "set step on" in the unload method and it went all the way through with no problem, released the form and moved on - presumably to the next form in _vfp.forms...