Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error:1924 FORMS is not an object.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00090869
Message ID:
00090873
Views:
27
>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
David,

What might be happening (and this is a guess) is because of the way, you're releasing the FormCount value is diminishing as you go. You might be hitting:

_SCREEN.Forms[0]

Which might cause this error. Trying assigning the .FormCount property to a variable and use that to count the number of times the loop needs to iterate.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform