Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: With Collections or FOR EACH...
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00841263
Message ID:
00841284
Views:
22
>Yeah, I know. At least working around this is no big deal. It was just danged annoying until I actually traced through the code. Doing the same thing using objects that are not collections works as expected [AFAIK] so I tried the same with my collection.
>
>To get the expected results, I just changed my actual code to:
>PROCEDURE GetFormObjectRef
>    LPARAMETERS tcName
>    tcName = ALLTRIM(UPPER(tcName))
>    LOCAL loForm, loReturn
>    loReturn = .null.
>    FOR EACH loForm IN THIS.FormList
>        IF UPPER(loForm.NAME) == tcName AND UPPER(loForm.BASECLASS) = 'FORM'
>            loReturn = loForm
>        ENDIF
>    ENDFOR
>    RETURN loReturn
>ENDPROC
Well, I didn't mean that you had to by-pass the early exit.< g >

If VFP is doing what I speculated, then, I think, we should view it as a good thing. A PITA for us to have to change? Sure! I'd rather have to make such change if it reduced memory problems, which are very hard to track down. Wouldn't you?
George

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

Click here to load this message in the networking platform