Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: With Collections or FOR EACH...
Message
From
24/10/2003 10:25:24
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00841263
Message ID:
00842108
Views:
19
>Hi Tamar,
>
>
>>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.
>
>Now I'm more confused. You say you use it a lot - Mark says it doesn't work. I've never expected it behave that way.
>
>I've always worked on the assumption that the reference scope is local to the FOR EACH..ENDFOR block. Can you give me an example where this isn't the case ?
>

This code works:
lFound = .F.
FOR EACH oProp IN oDocument.CustomDocumentProperties
   IF oProp.Name == "iDocumentID"
      * Found it. Get out of here
      lFound = .T.
      EXIT
   ENDIF
ENDFOR

IF lFound
   iDocID = oProp.Value
ENDIF
Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform