Hi!
In the docs it says "The private
modifier specifies that the member can only be accessed in its own class."
To me it seems that private (and protected aswelll for that matter) members are only accessable in the same OBJECT rather than the same class.
class A { private var _member; public function initialize(){ } public function calcMember(){ _member = doSomeFancyCalculation(); } public static function createFromStorage() as A { var newA = new A(); // Error: Symbol Not Found Error // Details: Could not find symbol '_member' newA._member = Storage.getValue("key_storedMember"); return newA; } }
Am I missing something?
This is weird, right?
It makes something like a static factory method very cumbersome to implement.
Let me know if I've missed something here. If not, I think the docs should be updated and this restriction (compared to e.g. java) should be mentioned.