-
22 Dec 2011 5:29 PM #1
Answered: How to migrate Sencha touch 1.1 app into Sencha Touch 2.0?
Answered: How to migrate Sencha touch 1.1 app into Sencha Touch 2.0?
I have a demo application which is running in Sencha Touch 1.1. But when I switch to Sencha Touch 2.0 (sencha-touch-all.js), it doesn't work at all. Here is my code in app.js:
The error message is:Code:var App = new Ext.Application({ name: 'NotesApp', useLoadMask: true, launch: function () { Ext.dispatch({ controller: NotesApp.controllers.notesController, action: 'index' }); } });
What's wrong with it? Thanks
Uncaught ReferenceError: NotesApp is not defined
-
Best Answer Posted by aoathout
There isn't a roadmap / projected release date that has been shared with any of us. Personally I want to see the Sencha team take their time and get it right instead of rushing things and making promises on dates. It's only PR release now and it sounds like the next release will be PR4.
I've migrated some 1.1.1 apps to 2.0 PR* and it wasn't really hard. Models, stores, etc. (with some minor changes). can be reused. Right now I keep my projects on 1.1.1 but spend some time on a different branch doing mods for 2.0 so I'm ready when GA is released. It all really depends on how much time / risk you want to put in.
-
22 Dec 2011 5:31 PM #2
Ext.dispatch is gone in 2.x, don't use it. Look at the example apps and posts that are in the forum. They will show you everything you need to know.
-
22 Dec 2011 5:37 PM #3
Then here comes a new question. How am I going to create a MVC app if Ext.dispatch is not available in 2.x.
Thanks
-
22 Dec 2011 5:43 PM #4
Your controller should now listen to events (application / view / etc. level). You do this with 'control' in your init() on the controller. Example:
Look at this example that Mitchell has provided:Code:init: function() { this.control({ 'tab[title="Menu"]': { tap: function() { this.onMenuTabTap() } }, ........ }, onMenuTabTap: function() { var me = this; setTimeout(function() { var categoryStore = me.getCategoryStore(); categoryStore.clearFilter(); categoryStore.filter('menu_id', 1); }, 100); }
http://www.sencha.com/forum/showthre...le-MVC-example
-
22 Dec 2011 6:10 PM #5
Thank you. I'll try that.
It's very difficult for me to make decision to use 1.x or 2.x. The target for my new project will be release in about another half year (the demo should be ready in a month also). If I'm using 1.x, then my code can't be used in 2.x at all. Migration seems not to be an easy job. But if I use 2.x, I'm afraid the official 2.0 will not release when I release my product.
Are there any road map for 2.x so that I roughly know when the 2.0 final version will be released?
-
22 Dec 2011 6:20 PM #6
There isn't a roadmap / projected release date that has been shared with any of us. Personally I want to see the Sencha team take their time and get it right instead of rushing things and making promises on dates. It's only PR release now and it sounds like the next release will be PR4.
I've migrated some 1.1.1 apps to 2.0 PR* and it wasn't really hard. Models, stores, etc. (with some minor changes). can be reused. Right now I keep my projects on 1.1.1 but spend some time on a different branch doing mods for 2.0 so I'm ready when GA is released. It all really depends on how much time / risk you want to put in.
-
22 Dec 2011 7:32 PM #7
Thanks for your advise.
I'm going to start my project in 1.1 first. And then migrate into 2.0 later.


Reply With Quote