Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning A value from a Class???
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00668213
Message ID:
00668418
Vues:
22
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform