Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add property to an empty object?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Contracts, agreements and general business
Title:
How to add property to an empty object?
Miscellaneous
Thread ID:
01680052
Message ID:
01680052
Views:
44
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
Next
Reply
Map
View

Click here to load this message in the networking platform