Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing an array to a form
Message
From
29/06/1999 13:04:00
 
 
To
29/06/1999 11:40:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00235291
Message ID:
00235338
Views:
13
>Hi gang!
>
>OK...have a situation that I could use some "been there, done that" advice on. I have a selection form and I'd like to store the selected values to an array. I'd like to create the array in the calling method and pass it to the form. I've tried:
>
>PUBLIC ARRAY aSelected[1]
>DO FORM frmSelector WITH @aSelected
>
>But it bombs. Doesn't like the Byref "@" sign. And I don't like the idea of declaring public memvars to begin with.
>
>Any suggestions on an alternative architecture? I have it working with PUBLIC ARRAY aSelected[1] and then hard-wiring the reference to aSelected in frmSelector but I don't like to hard-wire memvar references.

My favorite is to create an Object with a member array which you pass to the form and save the object reference in a form property; the form updates the member array in the object. When the form exits, the object now holds the updated array.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform