Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error:1924 FORMS is not an object.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00090869
Message ID:
00090873
Vues:
28
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform