View Full Version : Ext.Application Functional or In-Development?

18 Feb 2011, 12:45 PM
I've been looking quite a bit at the source code and various documentation sources and am quite intrigued about Ext.Application. In creating a test, however, I've had problems with actually getting the application created. It appears to do with this section of code and autoInitViewport having issues:


if (this.autoInitViewport) {
Ext.Viewport.init(this.onBeforeLaunch, this);
} else {

(It reports Ext.Viewport doesn't have an init function and the source only contains initComponent as far as I can tell -- but calling that instead doesn't allow for functionality, again, as far as I can tell.)

Could you confirm that this is either in-development or functional as far as you know? That will help me to determine if I should spend more time trying to debug.

BTW: Whether done or not, this class is going to be a [B]major plus. I love how it creates a configuration to get one going in just a few lines of code. Thank you!

Also, the source code for Application.js says, "If you generated your Sencha app using the Sencha Command application generator script..." Is this something which is still under development or has it been released and I just haven't found where?

Thank you, again.

19 Feb 2011, 1:28 AM
nvm. I just had to figure out the right touch.

19 Feb 2011, 7:14 PM
I've run into the same problem, could you share a working sample?

19 Feb 2011, 11:14 PM
It appears that they're merging the Sencha Touch Application object into Ext JS 4 and that it hasn't been fully implemented. To use the MVC setup that comes as a part of the application and to be ready for when the Application object for Ext JS 4 is released, I temporarily set "autoInitViewport": false since the Sencha Touch Viewport initialization was engineered around profile support and who knows what the Ext JS 4 Viewport.init will be designed to do. Setting "autoInitViewport": false just disabled the attempt to init the viewport, but still calls the "launch", allowing me to then self-init the viewport.

I can't imagine that they would remove the .models, .stores, .views, .controllers, so having those setup in what's likely a forward-compatible way does have advantages.

Hope that helps, but if you need actual code, please post your attempt at it.

20 Feb 2011, 6:46 AM
I had the same problem and solved it by switching the auto init off like so:

name: 'MyApp',
autoInitViewport: false,
launch: function() {
// Do your stuff...

By the way, it's called a preview release for a reason...