Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing a 2-dimensional array as a parameter
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00535115
Message ID:
00535124
Views:
13
This message has been marked as the solution to the initial question of the thread.
You have to pass an array by reference, otherwise you are passing only the first element of the array
loEventObj = CreateObject('CompReplaceAllBomEvent', tnOrderOpt, ;
vp_cOrigSkuNum, vp_cNewSkuNum, <b>@laBomsAffected</b>)
>Hello,
>
>I know similar questions have been asked numerous times here, but none of the threads I have read have been able to help me, as they require the array is being passed to a form.
>
>What I am trying to do is pass a 2-dimensional array from a form-based class to an event-based class. I am using VFP 6 and the latest Mere Mortals version:
>
>SELECT(ThisForm.cUtility.grdBoms.cGridList.RecordSource)
>
>lnRecNum = RECCOUNT()
>
>DIMENSION laBomsAffected(lnRecNum,5)
>
>*loops through the recordsource of the grid by row
>SCAN
>
> COPY TO ARRAY laBomsAffected
>
>ENDSCAN
>
>* Create event object.
>loEventObj = CreateObject('CompReplaceAllBomEvent', tnOrderOpt, ;
>vp_cOrigSkuNum, vp_cNewSkuNum, laBomsAffected)
>
>Any help would be very much appreciated as this has become one of those torturous bits of code that cause premature hair loss for me.
>
>TIA!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform