Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding object to another object
Message
De
15/11/2001 23:30:54
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00582471
Message ID:
00582548
Vues:
33
>>>>If I create a custom object, I can easily use AddObject() to add another object to that object. But, when my object is from another object, the ability to use AddObject() is not supported. How can I bind another object in that case?
>>>
>>>AFAIK, almost all base classes support Addproperty method. You can use it to store a reference to another object.
Myobject.Addproperty("oOtherObject", NewObject( "OtherObject", "SomeClasslib"))
>>
>>That is also not supported.
>
>No, but this is.
>local lotmp
>lotmp = NewObject( "OtherObject", "SomeClasslib")
>Myobject.Addproperty("oOtherObject", lotmp)
>
>The combination of two functions that create new items throws VFP into a spin.

Despite the fact that this may work with regular Visual FoxPro components, when the object is MSSoap, it doesn't work.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform