Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add property to an empty object?
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrats & ententes
Titre:
How to add property to an empty object?
Divers
Thread ID:
01680052
Message ID:
01680052
Vues:
45
Hi,

I want to create an empty object as a property of another object. Then add a couple of properties to the empty object.
Here is what I know how to do:
toObject.AddProperty("oTableInfo", "Empty")
Then, I need to add a property 'config_xml' to the oTableInfo and set it to empty string (''). I tried the following:
AddProperty( toObject.oTableInfo, "config_xml", "")
But the above gives a run-time error. What am I missing?

TIA

UPDATE: This works:
	LOCAL oTableInfo
	oTableInfo = CREATEOBJECT("empty")
	ADDPROPERTY( oTableInfo, "config_xml", "" )
    toObject.AddProperty("oTableInfo", oTableInfo)
Let me know if the above works but wrong.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform