Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cdo.message
Message
 
 
À
14/01/2009 06:46:13
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01373442
Message ID:
01373508
Vues:
42
>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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform