Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing array property of an object
Message
From
02/04/1999 11:12:55
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00204115
Message ID:
00204660
Views:
15
>>>You cannot pass any object property by reference and that is as it should be.
>>
>>May I disagree with "as it should be"? :)
>>
>>Vlad
>
>Vlad,
>
>You can disagree with anything you like. However, passing a member of an object to another object without using the reference is a violation of everything that OO is about.
>
>An object encapsulates function and data, that data is an integral part of the object. The only way the data of an object should be affected is through the object itself. Passing a property by reference allows the data aspect of the object to be manipulated without communication with the object itself. That's why I said "as it should be." And I believe it is as it should be.

H Jim!
You are right, if parameter passing link to outside from the object.
But what if the object itself want to manipulate on its own property in one of its method, like:

this.property=upper(this.property)

BB
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform