Search code examples
extjssencha-touch-2sencha-architect

Cannot find function


I am using sencha architect. i added a function in app.js to call it inside an event listener of a view. Adding it manually by editing app.js file like:

function a(){

}

works as expected.

The problem is that if I add it by using architect resulting in:

a:function{

}

inside app.js, calling function in the event listener results in can't find variable error. Do you have a clue why this is happening? I would like to add it by architect since whenever I add a new view f.e the app.js is overwritten.


Solution

  • Found the solution, in order to call it right it should be: NameOftheApp.app.a()