karpatyx@ya.ru
5 Dec 2011, 9:34 AM
Hello guys,
Sorry for kind of a stupid question, but I believe that anybody of you can answer in 10 seconds while I haven't figured answer yet in 25 minutes :).
I have singleton class and I want it listening to application-level events:
Ext.define('ikhtml.utils.windowManager.windowManager', {
singleton: true,
constructor: function ()
{
this.application.on({
loggedOut: this.onLoggedOut,
scope: this
});
}
...
But "application" property is valid only for controllers. How to access application instance from other classes?
Sure, I can pass it as parameter or set as property, but there should be much better solution.
Thanks for YOUR time.
Sorry for kind of a stupid question, but I believe that anybody of you can answer in 10 seconds while I haven't figured answer yet in 25 minutes :).
I have singleton class and I want it listening to application-level events:
Ext.define('ikhtml.utils.windowManager.windowManager', {
singleton: true,
constructor: function ()
{
this.application.on({
loggedOut: this.onLoggedOut,
scope: this
});
}
...
But "application" property is valid only for controllers. How to access application instance from other classes?
Sure, I can pass it as parameter or set as property, but there should be much better solution.
Thanks for YOUR time.