I think im missing something very simple here.

Please advice, how to reference a object ( initialized in the controller launch function) in my button listener.

My controller launch and buttonlistener looks like this

launch: function() {

myapp = {
dosomething: function(x,y){
bla bla bla
var options = { bla bla}


onSendFormButtonTap: function(button, e, eOpts) {

myapp.dosomething(x,y);    //Does not work myapp is undefined