Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing class array properties to methods
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00332569
Message ID:
00332658
Views:
12
>Hi gang,
>
>I have a custom class in which I've defined an array property. I now want to pass that array, BY REFERENCE, to a method in the same class which updates that array, similar to the following:
>
>THIS.MyMethod( @THIS.MyArray )
>

Can't tell you why, but as you found, this doesn't work. Copy the array property to a local array first, and then pass that:

=ACOPY(THIS.Array, laNewArray)
THIS.MyMethod(@laNewArray)
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform