i know i know… I’m a pain in the ***. But I have to figure this out, it’s killing me. please, please, please.
in the main document class… I create the model, using data not shown… and then make a new controller, and send in the model… simple enough.
var _model:SisuModel = new SisuModel( this.data ); sc = new SisuController( _model );
then I create a menu (view) sending in both the model and the controller.
var _menuNavView:MenuNav = new MenuNav( _model , sc);
So inside the menunav class, I super() the model and controller storing it in the View class menunav extends, and that should make both the model and controller accessible. and it even traces an instance of the controller…
super(model, controller); trace("from sisu controller = "+controller); //traces [Sisu controller]
but if I want to add a listener to a button, that calls a method from the controller, it won’t work!!
btn.addEventListener( MouseEvent.CLICK, controller.clickHandler, false, 0, true );
that throws the error in the picture below. I am absolutely positive there is a way for me to access that method inside SisuController, I just don’t know how…
Sisu controller extends controller, but only has that one extra method… uughh… i’m begging