Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cdo.message
Message
 
 
To
14/01/2009 06:46:13
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01373442
Message ID:
01373508
Views:
34
>While compiling cdo2000.prg an error occurs. Fox version is 6. Maybe cdo200 requires later version of vfp?

It uses Collection class, that is not present in VFP6, to store errors. You can easily change the class to use arrays instead or you can create your own collection class. I provided below a simple implementation of such class for this specific case only.
	PROTECTED PROCEDURE Init
		* Create error collection
		*This.oErrors = CREATEOBJECT("Collection")
		This.oErrors = NEWOBJECT("Collection", "Collection4Vfp6.fxp")
* Collection4Vfp6.prg
DEFINE CLASS Collection AS Custom
	Name = "Collection"
	DIMENSION aCollection[1]
	Count = 0
	
	FUNCTION Add(tvValue)
		This.Count = This.Count + 1 
		DIMENSION This.aCollection[This.Count]
		This.aCollection[This.Count] = tvValue
	ENDFUNC
	
	FUNCTION Remove(tnIndex)
		DIMENSION This.aCollection[1]
		This.Count = 0	
	ENDFUNC

	FUNCTION Item(tnIndex)
		RETURN This.aCollection[tnIndex]
	ENDFUNC

ENDDEFINE
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform