global variables

I'm using Designer 2 to create my sencha 2 app. But now i'm in the need of using a global variable(s).
Normally i would just create another .js file called globals.js in which i put some global variables, like a url to a wsdl and include that into my index.hmtl.

But i was wondering if Designer 2 offers some kind of abillity to add global variables which can be used throughout my application.

I do have another problem though. I also need a few 'global' functions. I used to just add functions to my controller which i could just call like:

myApp.controller.Main.backButton();

But in the Designer tool i can only add functions based on events, like; keyUp, onItemTap etc. I can't even approach my controller anymore through "MyApp.controller.Main.backButton()" (that's how it is Ext.defined).

But sometimes i just want to call a custom function. Any idea how i'm able to do that in the Designer tool? Couldn't find the answer for this in the examples.

So as you can see i need to call my controller function from my DIV with certain parameters. The best way to do this is to directly call the function of a Controller. Is there any way to do that...??

On your example i have no idea where to define the 'event listener'. How to make it work when the amount of DIVs are dynamic. How to pass the needed params from the event listener to the Controller.
And in 'basic.showTest()', i have no idea where 'basic' comes from. I tried to replace that with the name of my controller, but that's "undefined".

Anyway, i'd rather call my Controller function directly. I really hope that this is possible..

The pseudo code which you have posted above will have severe memory leaks.

You do not want to attach event handlers via DOM level 0 event handling "onclick" attributes. Instead you want to subscribe to the DataView's click event which uses dom event delegation. It will determine which record you clicked on and you can read the guid and additional parameters out of it.