General information
Category:
Coding, syntax & commands
Title:
Property Arrays: Cannot pass by reference!!!
Is it me, or does VFP not allow one to pass a property array by reference? Example:
Class definition:
Define Class myClass as Custom
Dimension AnArray(1)
EndDefine
Instantiation:
oMyObj=CreateObj("myClass")
* Assume that oMyObj.AnArray is redimensioned and filled in with something useful.
Later:
Do AnyProcedure with oMyObj.AnArray
In this situation, I have found there is no way to get VFP to pass the array by reference. Instead, it simply passes the fist element of the array. Set UDFParms and using "@" has no effect (in fact, you cannot use the "@" symbol when trying to pass an object reference).
This is really a nuisance because the receiving routine doesn't give a darn if the array is attached to an object variable or not. It simply wants an array by reference!
Is there a workaround? Thanks!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only