Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ACOPY feature not available
Message
From
04/04/2011 23:11:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
ACOPY feature not available
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01506084
Message ID:
01506084
Views:
118
Hi All

Have been struggling with this for some time now. I think I am hoping it is a simple error on my part!

Here is a simple class definition
DEFINE CLASS MyTest AS custom olepublic
	PROCEDURE MakeCopy
	lparam oo
	oo.addproperty("aat[9]")
	DIMENSION Aat[9,1]
	DIMENSION bbt[9]
	aat[1,1]="Something here"
	aat[9,1]="Something more here"
	
	=ACOPY(aat,oo.aat)

	endproc
ENDDEFINE
If i create a DLL from this and run it
oJ=CREATEOBJECT("acopytest.mytest")
bb=CREATEOBJECT('custom')
oj.MakeCopy(bb)
I get the Feature not available error (1001) on the ACOPY line

However if I create an object from it it works fine
oJ=CREATEOBJECT("mytest")
bb=CREATEOBJECT('custom')
oj.MakeCopy(bb)
?bb.aat[1]
?bb.aat[9]
The acopy works fine in COM as long as it isn't copying the array to an object property.

Any ideas?
Cheers
Charlie
Next
Reply
Map
View

Click here to load this message in the networking platform