Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding object to another object
Message
 
 
To
15/11/2001 20:46:04
Michel Fournier (Online)
Level Extreme Inc.
Petit-Rocher, New Brunswick, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00582471
Message ID:
00582517
Views:
26
>>>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.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform