From d63ffd91086de01ef005b345e601e97370538c3b Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Mon, 20 Feb 2006 03:08:25 +0000 Subject: [PATCH] Added a note about fucked-up access control in ActionScript. Maybe this explains why they put all subclasses of Event in the same package. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3867 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/README.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/as/com/threerings/README.txt b/src/as/com/threerings/README.txt index 7cf8bb6de..d1a214b9b 100644 --- a/src/as/com/threerings/README.txt +++ b/src/as/com/threerings/README.txt @@ -88,3 +88,18 @@ Notes - 'protected' doesn't mean the same thing in ActionScript: it means that ONLY subclasses can access a field/method, other classes in the same package cannot access it. + +Java Class Package Subclass World + private Y N N N + Y Y N N + protected Y Y Y N + public Y Y Y Y + +Actionscript + private Y N N N + protected Y Y N N + internal Y Y Y N (but not a subclass in a diff pkg!) + public Y Y Y Y + + SO: if you want a method to be accessable to a subclass in a different + package, it must be public!