-
17 Sep 2012 3:45 PM #1
Answered: Adding statics to controller
Answered: Adding statics to controller
1. Is it the appropriate to put statics under controller? After all they don't have statics member in config object, but they have method for that, which confuses me immensely.
2. Does anyone have better solution. I just want to have them declared under this file and not in e.g. app.js.
Code:alternateClassName: 'HM', constructor: function() { this.callParent(arguments); HM.addStatics({ pe: '#phonegap=external', openUrl: function(url) { if (Ext.os.is.Phone) { this.openOutsideWebview(url); } else { window.open(url); } }, openOutsideWebview: function(url) { window.open(url + this.pe); } }); }
-
Best Answer Posted by jay@moduscreate.com
Controllers only have one instance. Why is statics necessarY?
-
18 Sep 2012 6:42 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
- Answers
- 83
Controllers only have one instance. Why is statics necessarY?

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
29 Sep 2012 9:48 AM #3


Reply With Quote