1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    42
    Vote Rating
    0
    bagusflyer is on a distinguished road

      0  

    Default 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:

    Code:
    var App = new Ext.Application({
        name: 'NotesApp',
        useLoadMask: true,
    
    
        launch: function () {
        
            Ext.dispatch({
                controller: NotesApp.controllers.notesController,
                action: 'index'
            });
        }
    });
    The error message is:


    Uncaught ReferenceError: NotesApp is not defined
    What's wrong with it? Thanks

  2. 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.

  3. #2
    Sencha User
    Join Date
    Aug 2011
    Location
    Cedar Rapids, IA
    Posts
    63
    Vote Rating
    1
    Answers
    8
    aoathout is on a distinguished road

      0  

    Default


    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.

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    42
    Vote Rating
    0
    bagusflyer is on a distinguished road

      0  

    Default


    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

  5. #4
    Sencha User
    Join Date
    Aug 2011
    Location
    Cedar Rapids, IA
    Posts
    63
    Vote Rating
    1
    Answers
    8
    aoathout is on a distinguished road

      0  

    Default


    Your controller should now listen to events (application / view / etc. level). You do this with 'control' in your init() on the controller. Example:

    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);
    }
    Look at this example that Mitchell has provided:

    http://www.sencha.com/forum/showthre...le-MVC-example

  6. #5
    Sencha User
    Join Date
    Dec 2011
    Posts
    42
    Vote Rating
    0
    bagusflyer is on a distinguished road

      0  

    Default


    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?

  7. #6
    Sencha User
    Join Date
    Aug 2011
    Location
    Cedar Rapids, IA
    Posts
    63
    Vote Rating
    1
    Answers
    8
    aoathout is on a distinguished road

      0  

    Default


    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.

  8. #7
    Sencha User
    Join Date
    Dec 2011
    Posts
    42
    Vote Rating
    0
    bagusflyer is on a distinguished road

      0  

    Default


    Thanks for your advise.

    I'm going to start my project in 1.1 first. And then migrate into 2.0 later.

Thread Participants: 1