Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Do I Return a Value From An Object
Message
De
17/06/2003 16:27:32
 
 
À
17/06/2003 16:16:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00800953
Message ID:
00800957
Vues:
28
You would do this in one of two ways. The first is to have a custom method that changes the value, then returns the new value:
ox=CREATEOBJECT("MyObj")
SomeValue = ox.MyMethod()
The second is to set a custom property of the object
ox=CREATEOBJECT("MyObj")
ox.SomeMethod()
SomeValue = ox.MyProperty
>Hello
>
>Is there a way to return a value from a class object other than
>to create a public var that gets reassigned INSIDE the object?
>
>Public myVar
>myVar = ""
>oMyObj=createobject('myObj')
>oMyObj.Show()
>**_ change the var via some action in the object
>?myVar
>
>Thank you
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform