Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scoping of Variables
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00011488
Message ID:
00011598
Views:
32
>>>Hi guys, can anybody explain me how the scope of
>>>variables works in Visual Foxpro. I need to
>>>pass by reference variables to a form, so I can
>>>change inside the form the values of the original
>>>variables and keep that value, in the old days, that
>>>is in Foxpro 2.6, everything that was declared in the
>>>"setup" section of my screen was recognized in all
>>>the functions of my "cleanup" section, now I know
>>>that I have to put my parameters statements in the
>>>"Init" method of my form, but after that it doesn't
>>>recognize those vaiables in any other method or procedure and I don't want to create new properties
>>>just to do that, because sometimes I need to do it with too many variables and I don't want to make those variables "public".
>>>Thanks in advance.
>>>luisg@netrunner.net
>>
>>i usually add properties to my form and store the parameters i've passed in them. also, when creating an object w/ createobject, these properties are available until releasing the object.
>
>Thanks for your help guys :), I think I'm going to need to do that.
Ok, I tried to create new properties and it recognizes it in all
my methods and procedures, but I still have a problem, first, what
I would like to do is send the variable to a form lets say :
DO oMyForm WITH aMyArray, Where aMyArray is an array,
Change the dimension of the array inside of the form, assign new
values to it, and after releasing the form keep the new values in aMyArray,
make some sense ?. I can't use the unload method because it doesn't
return arrays, and sometimes I need to change more than one variable
or array, and I don't want to make aMyArray public.
I will apreciate any sugestion, thanks in advance.
P.S. This is driving me nuts.
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform