>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