Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning A value from a Class???
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00668213
Message ID:
00668418
Views:
24
Hi, Leroy!

>>
The parent of the calling command button has a cMystate Property
Do I put that into the reference?
<<

Yes, great idea!
* putting an object reference into a variable
* (in this case the reference of the parent of the command button
*  this parent has the cMyState property)
loObject = This.Parent
oMyState = Createobject('GetState', loObject)
...
>>
How would I create an object that has "cMyState" as a property.
<<

Look at this:
* create an object of any class
* Note: "Relation" class is a flyweight, that's why it's more suitable instead of container
*       or other more weighty classes!
loObject = NEWOBJECT( "Relation" )
* adding the wished property
loObject.AddProperty( "cMyState" )
oMyState = Createobject('GetState', loObject)
...
SeBaFlu
Previous
Reply
Map
View

Click here to load this message in the networking platform