0
votes

I am new at Sencha Touch 2 and have a question (Maybe it is a noob question but I need an answer :-) )

My controller for a View looks like :

Ext.define('Myapp.controller.Controller', { extend : 'Ext.app.Controller',

      config : {
           refs : {
                button : '#Wrapper .btn'
           },
           controller : {
                button : {
                     tap : 'exeFunc'  
                }
           }
      },

      execFunc : function() { alert("OK"); }

});

I have an panel with id "Wrapper" and it contains an item of xtype "button" with cls-attribute "btn"...

Why wont execFunc not executed? What did I do wrong?

Thanks for answers.

1

1 Answers

0
votes

The selectors are component selectors, not DOM selectors, the class that you give to the element is irrelevant.

You'd need to have it be something like: '#Wrapper button[cls=btn]'