Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: With Collections or FOR EACH...
Message
De
24/10/2003 10:25:24
 
 
À
24/10/2003 04:05:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00841263
Message ID:
00842108
Vues:
20
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform