I have a Sencha Touch application I am trying to set a global variable for. EDIT: More clarification, I need to be able to access this global variable across all views.
I set the variable on the application to it's default value, then overwrite it during a launch. However, it's not being overwritten.
Ext.application({
name: 'hd',
isAuth: 'false',
launch: function() {
hd.app.isAuth = 'true';
Ext.Msg.alert(hd.app.isAuth); //This always returns 'false'
}
});
I'm not getting any console errors and I cannot find anyone who is having a similar issue. I'm obviously doing it wrong. Can anyone show me the correct way to do this?