1. #1
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    124
    Answers
    1
    Vote Rating
    0
    JavascriptParrot is on a distinguished road

      0  

    Question Unanswered: Ext.dispatch does nothing?? Why?

    Unanswered: Ext.dispatch does nothing?? Why?


    Hello,

    I have a application with an tabbar in the viewport. Now I want to dispatch some action but it don't work

    Code:
    Ext.dispatch({
        controller: app.controllers.WachtwoordController,
        action: 'index',
            historyUrl: 'Afleveradres/index',
            animation: {
               type: 'slide',
                reverse: false,
            },
    });
    What I am doing wrong? Nothing is happening, no script errors... still doesn't nothing.

    Thanks,
    Freez

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,797
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Step through the dispatch method with a breakpoint. Can the controller be found... is the action a method on the controller?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    124
    Answers
    1
    Vote Rating
    0
    JavascriptParrot is on a distinguished road

      0  

    Default


    Thanks for you're reply.


    I got an error now, the controller is not undefined and the action exists.

    Code:
    Uncaught TypeError: Cannot read property 'isComponent' of undefined
    Ext.lib.Container.Ext.extend.createComponentsencha-touch-debug-w-comments.js:31949
    Ext.lib.Container.Ext.extend.lookupComponentsencha-touch-debug-w-comments.js:31942
    Ext.lib.Container.Ext.extend.prepareItemssencha-touch-debug-w-comments.js:31909
    Ext.lib.Container.Ext.extend.addsencha-touch-debug-w-comments.js:32031
    Ext.layout.CardLayout.Ext.extend.setActiveItemsencha-touch-debug-w-comments.js:44620
    Ext.Container.Ext.extend.setActiveItemsencha-touch-debug-w-comments.js:32556
    app.controllers.WachtwoordController.Ext.Controller.indexWachtwoordController.js:4
    Ext.util.Dispatcher.Ext.extend.dispatchsencha-touch-debug-w-comments.js:17592
    Ext.dispatchsencha-touch-debug-w-comments.js:17716
    app.views.AfleveradresList.Ext.extend.passwordButtonTapAfleveradresListView.js:85
    Ext.Button.Ext.extend.callHandlersencha-touch-debug-w-comments.js:33487
    (anonymous function)
    It's going wrong at the follow line


    Code:
    if (controller && action) {
    controller[action].call(controller, interaction); //this line!!
    interaction.dispatched = true;
    }

    It stopped working after implement the tabbar, maybe I have changed to much?


    Thanks,
    Freez
    Last edited by JavascriptParrot; 4 Jan 2012 at 2:44 AM. Reason: add some more info

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,797
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    It looks like it has nothing to do with Ext.dispatch. Are you doing anything in the method you are calling that is setting the active item?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    124
    Answers
    1
    Vote Rating
    0
    JavascriptParrot is on a distinguished road

      0  

    Default


    Nope... there is nothing done in the method.

    It looks like I'm demolished everything, I think I start over, I'm totally confused...

    I need an application with 3 panels without tabbar and 6 panels with a tabbar, what is the best method to do that? I'm completely lost... very frustrated!

    Thanks Freez

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi