thanks for the article, its very good. It has been pretty interesting to know how to manage the visibility in this new feature. My question is:
What happens if, in the last example, I pass a private property but instead of a scalar it'd be an Object. What happens if inside the nestedClass I modify one of the object's properties?, is the original object going to be modified? thanks
Dave Smith - 2016-01-10 17:18:07 - In reply to message 1 from Eric Bris
I haven't tested it, however I can't think of a reason you would not be able to pass an object.
We have to pass the object, since private properties are not inherited, which results in a new object. Any changes made to the new object will not effect the original object.
You could always set up a method that updates the new object and passes the result back to the main class which would have a method to update the original object. Since it is a private property, it would have to been accomplished inside the main class.