Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: With Collections or FOR EACH...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00841263
Message ID:
00841284
Vues:
23
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform