Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
VFP COMM will not support an array
Scenario 1: I create an object with an array property, it works fine.
Scenario 2: I create the same object as a com object, the array is no longer an array.
This code can be run two ways to show what I mean:
**************************** PRG CODE ****************************
public o, mm
*: o = createobject('vfpapptier.vfpdataobjectvisual')
o = createobject('vfpdataobjectvisual')
mm = o.GetTheCursor()
DEFINE CLASS vfpdataobjectvisual AS custom
*: DEFINE CLASS vfpdataobjectvisual AS custom OLEPUBLIC
Name = "vfpdataobjectvisual"
DIMENSION ArrayCursor[1]
DIMENSION ArrayAnother[3,1]
PROCEDURE getthecursor
create cursor cTest (FieldOne c(10))
insert into cTest (fieldone) values ('One')
insert into cTest (fieldone) values ('Two')
insert into cTest (fieldone) values ('Three')
dimension this.ArrayCursor(reccount(),1)
copy to array this.ArrayCursor
use in cTest
store 'John' to this.ArrayAnother
return this
ENDPROC
ENDDEFINE
******************* ENDOF PRG CODE ********************************
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement