Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is wrong?
Message
From
17/07/2007 20:39:41
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01241327
Message ID:
01241364
Views:
21
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform