Information générale
Catégorie:
Programmation Orientée Object
>>I have defined a class (olepublic) that uses another class as a collection. The way the other class is embedded is by using the addobject() in the INIT of the first class.
>
>I didn't see where you added the object reference to the array property- which is how you would have to access the objects. Adding objects at runtime won't work in a VFP COM object, because the interface isn't defined at compile time, so the client can't know that the object exists. But you can allow the objects to be referenced through a predefined property...
I am not sure I understand this correctly.
After the init of the PHONES object. I can access the collection by
oPhones.Errors (assuming that oPhones is the instantiated object of the PHONES class)
Now should I add a property to the class PHONES say CollErrors and then do the following after instantiating the object ?
this.collErrors=this.errors
I will try this.
Thanks
Mohinder
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement