Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Who do I belong to?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00383981
Message ID:
00384608
Vues:
28
Bill,

>This still doesn't tell me the name of the collection it only tells me the name of the object.

Your original post didn't cleary ask that question.

If you want to implement your own named collections using array properties, you are going to have to add a property to the contained objects and keep track of it yourself. You could pass the name of the collection into the Init() and store it from there.

Is there a reason you can't use the builtin collections Objects or Controls? You can iterate through them very easily. You could also make the collection it's own object instead of an array property and then this.parent would point to it. For example:
this.AddObject( "CollectionA", "cCollection" )
with this.CollectionA
   .AddObject( "member1", "textbox" )
   .AddObject( "member2", "textbox" )
endwith

this.AddObject( "CollectionB", "cCollection" )
with this.CollectionB
   .AddObject( "member1", "textbox" )
   .AddObject( "member2", "textbox" )
endwith
Doing this each collection can FOR EACH oObject in this.Objects and each collected (contained) object can use this.parent.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform