Sohan
PRIVATE not really private ?? September 30, 2008 06:26PM |
Class Myclass PRIVATE myInt is int END PROCEDURE MyMethod(objMyClass) oMySisterClass is MyClass dynamic = objMyClass // pass some other instance of the same class oMySisterClass:myInt++This works! I was totally surprised to see this. Is it conform other object oriented languages, or is this specific Windev behaviour?
Malc
Re: PRIVATE not really private ?? September 30, 2008 06:43PM |
Sohan
Re: PRIVATE not really private ?? September 30, 2008 07:07PM |
Alexandre Leclerc
Re: PRIVATE not really private ?? September 30, 2008 07:39PM |
Sohan
Re: PRIVATE not really private ?? September 30, 2008 08:06PM |
Georgio
Re: PRIVATE not really private ?? September 30, 2008 10:04PM |
Sohan
Re: PRIVATE not really private ?? September 30, 2008 10:35PM |
Georgio
Re: PRIVATE not really private ?? September 30, 2008 10:57PM |
Sohan
Re: PRIVATE not really private ?? September 30, 2008 11:39PM |
Class Myclass PRIVATE myInt is int END PROCEDURE MyMethod(objMyClass) oMySisterClass is MyClass dynamic = objMyClass // pass some other instance of the same class oMySisterClass:myInt++The executing code (lets say a window or a procedure) is:
MyInstance1 is MyClass MyInstance2 is MyClass MyInstance2:MyMethod(MyInstance1)This results in MyInstance1:myInt = 1.