Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp50 - Property value
Message
 
À
27/03/1997 13:25:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00025713
Message ID:
00025955
Vues:
35
>>>>>How can I change the property value from a form
>>>>>that is set in my class?
>>>>>
>>>>>I want the property value in my class to reflect a new value that I set in my form?
>>>>
>>>>oMyObject.MyProp = thisform.MyObject.value
>>>>
>>>>Something akin to that. Am I on track?
>>>>
>>>>Tom
>>>
>>>Having problems...
>>>
>>>In my parent class (base_form), I have a property called NUMBER. It's value is 500.
>>>
>>>In my subclass (a form called TEST), I want to change NUMBER to 700 and
>>>have this value reflected in the parent as a permanent change. If I MODI CLASS base_form, my property NUMBER should be 700.
>>>
>>>Help..
>>
>>
>>It won't happen automatically. This is the whole reason for sub-classing. So each class level would be different. Otherwise you would not need sub-classing.
>>
>>Tom
>
>I wanted to change a property value in a parent, then I could use it
>like a public var.. or else, what do I do for public vars in OOP.


You could make Objects public Vars and refer to their properties after they are instantiated. Public Vars as just vars should (IMO) be avoided.

Tom
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform