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:
00011700
Views:
35
>but if
>>I want to change the size of aMyArray like
>>DIMENSION aMyArray(4), and store new values in it to
>>keep that values after releasing the forms I can't do it,
>>in 2.6 this is really easy, I don't see why in the new version
>>they don't let you do that, the only way that I seems to
>>do it is making my form compatible with the ugly foundation
>>read setting my window type to READ MODAL.
>>Thanks anyway for trying to help.
>
>Luis,
>
>In 2.6 you had a foundation read, and the routine called the
>form was not out of scope. What is not clear to me is 'who'
>needs the information that you store in the array.
>
>Regards,
>
>Marc


Thanks Marc, let me explain what I need to do, lets say that I have
a main program like:

*Main Program
PRIVATE aMyArray
DIMENSION aMyArray(1)
aMyArray(1)='Apple'

SET UDFPARMS TO REFERENCE
DO FORM oMyForm WITH aMyArray

in the init event of my oMyform I have:
PARAMETERS apArray
...code,code and code
and then in the click event of the buttom that close my form I do this:

DIMENSION apArray(2)
apArray(1)='Tangerine'
apArray(2)='Orange'
RELEASE THISFORM

and when I return to the main program, guess what?, aMyArray only
have one value and this is 'Apple', the original one !!!, I have found
that this doesn't happen if you send an array by reference to a procedure
or function, but in forms it just don't work.
Like somebody said in our lovely "Microsoft support department",
It is not a bug, is a "feature".
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