Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating form variables
Message
From
02/01/2001 12:25:49
 
 
To
02/01/2001 09:02:20
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00458327
Message ID:
00458515
Views:
21
You cannot access a variable defined in a form or class from outside of that form or class, except if the variable was defined as PUBLIC. If you want to access this variable from outside, you have to define it as a property of the form/class or you have to create a method that will return it's value.
>1. When I click on the command button in the first form called from a program by 'do form form1 name 0123', I can access the properties by either o123.nameofproperty or thisform.nameofproperty.
>
>2. When I click on the command button in the second form which was called by the first form with 'do form form2 name o124' I cannot read the properties by using 0124.nameofproperty, but only thisform.nameofproperty. However, I can still use o123.nameofproperty to access the properties of the first form
>
>Why does being out of scope affect the second form and not the first form. I thought using 'do form xxx name oYYYY' allowed one to manipulate the form properties as a memory variable anywhere. It appears it does for the first form but not the second form.
Previous
Reply
Map
View

Click here to load this message in the networking platform