Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: With Collections or FOR EACH...
Message
From
23/10/2003 08:41:47
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00841263
Message ID:
00841499
Views:
19
>Hi,
>>
>
>        FOR EACH loForm IN THIS.FormList
>            IF UPPER(loForm.NAME) == tcName AND UPPER(loForm.BASECLASS) = 'FORM'
>                llFound = .T.
>                *!* BAM! As soon as the next line executes,
>                *!* loForm is no longer an object!
>                EXIT
>            ENDIF
>        ENDFOR
>
>>
>
>Am I missing something - I wouldn't expect loForm to be in scope outside of the FOR EACH - ENDFOR construct..
>

Why not? It's just a variable, either local (if defined) or private. I use constructions like this a lot to find things in collections.

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform