main logo
Subject: RE: Help translate VB to VFP: Dim args()
Author: wdurban (AT) datascantech DOT com
Posted: 2002/12/30 18:02:00
 
View Entire Thread
New Search


Ted,

Sorry, I was kinda kidding. I knew you knew better...

That statement in VB creates a zero-length "dynamic array" of type Variant.
I don't know how to simulate that in Fox.

Is it possible you can find out what type the 4th parameter is and
initialize the VFP array to that type value? It may be expecting an
object...

Hope this helps,
Bo Durban





Yes, Bo, I did. Sorry I forgot to mention that. I added an ' /AT/ ' to the args
argument D.OT Still got the same error, unless I changed args to a local scalar
(non-array). Then I got the message: OLE Error code 0x8002008: Bad variable
type.

-----Original Message-----
From: profox-admin@leafe.com [mailto:profox-admin /AT/ leafe D.OT com]On Behalf Of
wdurban@datascantech.com
Sent: Monday, 30 December, 2002 17:17
To: profox /AT/ leafe D.OT com
Subject: Re: Help translate VB to VFP: Dim args()




Ted,

Did you try passing the array by reference?

Bo Durban






I'm trying to convert some sample code from VB into VFP, and there's a
routine than DIMs an array and then passes it to a function:

Dim args()
Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter",
"_blank", 0, args)

Can anyone tell me how the args array should be declared in VFP so I don't
get an "OLE Error 0x80020005: Type mismatch?" I've declared it as LOCAL
args(1) to (10) and tried the variations of

COMARRAY(objDesktop, 1111) && and 0100 and 0010 and 0001 and 1111 and ...

and I've tried initializing the args array to NULL, zero, and a blank
string.

Any other ideas? Or have I got the DIM function all wrong?








 
©2002 wdurban /at/ datascantech .D.OT com
<-- Prior Message New Search Next Message -->