Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing an array to a form?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00151844
Message ID:
00151849
Views:
20
Larry,
My understanding is that you cannot pass arrays as arguments. If you try, you actually pass only the first element, and VFP doesn't recognize as an array. There are ways around that, which I might be able (??) to remember if you're interested.
Mark Gattis

>Help!?!?!?!?!
>
>I'm getting an error message trying to send an array to a forms' init method...
>
>The array I'm trying to pass is being recieved as numeric!
>
>What gives?
>
>
>-----------------------
>Here's the code
>
>
>
<strong>
>
>***********************
>* in the calling .prg *
>***********************
>
>* create array of selected records
>nRetRec = RECNO()
>SELECT RECNO() FROM ( goApp.cCUserID + 'UPDAAPVMO1' ) WHERE MARKED INTO ARRAY aRecList
>IF _TALLY = 0
>    DIMENSION aRecList(1,1)
>    aRecList(1,1) = nRetRec
>ENDIF
>GOTO nRetRec
>
>* create EDIT form
>oEUPDAAPVMO1 = CREATEOBJECT( "UPDAAPVMO1_Edit_Class", aRecList )
>
>
>*****************************************************
>* in the class definition for UPDAAPVMO1_Edit_Class *
>*****************************************************
>
>*------------------------------------------------------------
>PROCEDURE INIT
>    LPARAMETERS aRecList
>
>    * Parent class sets datasession environment settings ( dele, esca, talk, excl, etc. )
>    DODEFAULT()
>    THIS.cOpAlias = goApp.cOpAlias
>
>    * set keys
>    IF ALEN( aRecList, 1 ) > 1      ------>
>                                    ------> "aRecList is not an Array"
>                                    ------>
></strong>
>
>Thanks for any help!
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform