Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove item from VFP collection
Message
De
15/05/2005 06:01:22
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Remove item from VFP collection
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01014330
Message ID:
01014330
Vues:
209
Hi,
I have a collection that storing reference of empty objects. I want to remove those item which its cType = 'keyword'.

I tried this code, but it doesn't work correctly. It only remove some matched item but not all.
FOR EACH loItem IN myCollection
  IF loItem.cType = 'keyword'
    myCollection.Remove(loItem.cKey)
  ENDIF
NEXT
Currently, I use array to store all matched item key in FOR EACH loop, then only remove them one by one.

Any other way to do this?

Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform