From ee25f8f1a8a52b56b040940c00cbdcbf479f2ad2 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Tue, 28 Feb 2006 01:46:34 +0000 Subject: [PATCH] Updated note on accessibility domains: I was smoking crack. 'protected' members can be accessed by subclasses, but ONLY subclasses: other classes in the same package don't have visibility, unlike in Java. I think I got screwed up when protected members were not accessible to other classes in the same package. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3896 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/README.txt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/as/com/threerings/README.txt b/src/as/com/threerings/README.txt index 79da6e844..3202efbd8 100644 --- a/src/as/com/threerings/README.txt +++ b/src/as/com/threerings/README.txt @@ -114,9 +114,8 @@ Notes a method in their parent, except for toString(), even though it's defined for Object. Ya got me... -- '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. +- 'protected' means something slightly different from java: other classes + in the same package cannot access protected members, only subclasses may: Java Class Package Subclass World private Y N N N @@ -124,14 +123,12 @@ Java Class Package Subclass World protected Y Y Y N public Y Y Y Y -Actionscript +ActionScript private Y N N N - protected Y Y N N - internal Y Y Y N (but not a subclass in a diff pkg!) + internal Y Y N N + protected Y N Y N 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! - Beware of non-existant integer math: