Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is wrong?
Message
De
17/07/2007 20:39:41
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01241327
Message ID:
01241364
Vues:
22
>Hi everybody,
>
>Ok, I want to finish this problem today.
>
>This code:
>
>
> FOR lnCount = _screen.FormCount TO 1 STEP - 1
>      loForm = _screen.Forms[lnCount]
,,,
>   NEXT
>
>Gives form is not an object on loForm = _screen.Forms[lnCount] line.
>
>What I'm doing wrong today? I can put it in try/catch, but how can I exit gracefully?

Could it be that some code somewhere has simply set the form reference to null? Or that a form is in some sort of a limbo?

Last time I tried to write a loop like this, I kept going through this loop until there were none, or until a counter went more than initial _screen.formcount * 3. So it covered the forms which won't release because they are referenced in other forms - by releasing those other forms first, then trying the remaining ones again. And there was a try-endtry block, just in case of a limbo.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform