[RESOLVED] override protected getter?
I have 3 classes set up. An abstract, a concrete and a utility that needs access to the concretes getter. When I try to access the property of the concrete from within the utility it throws an error.
//abstract
PHP Code:
package{
import flash.errors.IllegalOperationError;
class{
protected function get left():Number{
throw new IllegalOperationError("Abstract method: must be overridden in a subclass");
}
}
}
//concrete
PHP Code:
package{
class extends abstract{
override protected function get left():Number{
return someVal;
}
}
}
//utility
PHP Code:
package{
class utility{
private var concrete:abstract;
public function utility(concreteClass:abstract){
this.concrete = concreteClass;
init();
}
private class init():void{
trace(concrete.left); //1178: Attempted access of inaccessible property left through a reference with static type abstract.
}
}
}
//client
PHP Code:
package{
class{
public function client():void{
var c = new concrete();
var u = new utility(c);
}
}
}
Any idea how to gain access?