Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pass the array to a form ?
Message
 
To
20/10/2004 05:08:08
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00952924
Message ID:
00952937
Views:
9
Yim,

No...

Your example send only first cell from array (this is designe behavior).
LOCAL ARRAY laPom(ALEN(thisform.array_properties,1),ALEN(thisform.array_properties,2))
=ACOPY(thisform.array_properties,laPom)
do form (Form A) with laPom
If you want pass array and return it, you can send object:
LOCAL loObj
loObj=CREATEOBJECT("_passArray")
LOCAL ARRAY loObj.aPom(ALEN(thisform.array_properties,1),ALEN(thisform.array_properties,2))

=ACOPY(thisform.array_properties,loObj.aPom)

do form (Form A) with myarray_table

** form.Init
LPARAM loObj
This._Param=loObj && You must create new property _Param

loObj.APom(1)="changed value"
** form.Init end


=ACOPY(loObj.aPom,thisform.array_properties)
?thisform.array_properties(1)

*************************************
DEFINE CLASS _passArray AS CUSTOM
   aPom(1) && Declare Array
ENDDFINE
MartinJ

>Hi,
>
>Thank for your reply,
>
>Can I store the array to the properties of a parent form and then pass the parent form's properties
>to the called form.
>
>such as:-
>
>thisform.array_properties = myarray_table
>do form (Form A) with thisform.array_properties
>
>is it right ?
>Can I do it ?
>Please correct it if I wrong.
>
>Thanks.
>Derek Yim
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform