Created
August 4, 2011 03:05
-
-
Save anandnalya/1124420 to your computer and use it in GitHub Desktop.
‘protected’ implementation in Actionscript 3 is BROKEN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseClass{ | |
public function modifyProperty(property:String, value:Object):void{ | |
this[property] = value; | |
} | |
} | |
public class SubClass extends SubClass{ | |
protected var count:int; | |
} | |
public function test():void{ | |
var testObj:BaseClass = new SubClass(); | |
testObj.modifyProperty('count', 3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment