>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.
John, I like Bob's solution best, but just to let you know that you can do what you are trying to do:
Parameters passed to a program or form with the WITH clause are always passed by reference. No need for the @ symbol.
DIMENSION laStuff(2)
laStuff[1] = "Howdy"
laStuff[2] = "Every thing's bigger in Texas"
DO FORM MyForm WITH laStuff
Form::Init
LPARA laStuff
?laStuff[1]
?laStuff[2]
laStuff[1] = "Aloha"
laStuff[2] = "Every thing's nicer in Hawaii"
Erik Moore
Clientelligence