Closed Ravenex closed 5 years ago
Actually this is the intended behaviour. Private access is granted only from the model own methods. Here you are extending the model with a class, Dad. The class constructor is not a method of the model, so private access is not granted.
The basic idea of private properties is that they should not be used outside of the model. So you should probably add a method to the model to handle this part. There is no "private/protected" distinction like in Java.
Technically, it is impossible to grant private acccess from a extended class constructor or method, because these functions run completely out of reach of ObjectModel interceptors ; that as their name suggests, only applies on Model properties.
That is fine, I can do this without the constructor, I actually found this while trying to simplify the file for the other error I posted. If this is intended then no problem.
Okay, I close the issue then
The code:
results in: