1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    8
    Vote Rating
    0
    nodohoung is on a distinguished road

      0  

    Default Answered: NavigationView problem with pop and push

    Answered: NavigationView problem with pop and push


    Hi all!

    I have a problem with NavigationView. I could not push a new view as after popping some views from a NavigationView (Ext.navigation.View). Here is my code:

    Code:
    navigationview.pop(); // or navigationview.pop(n)
    navigationview.push({xtype: 'button', text: 'New View'}); // nothing happens!
    How to resolve it, how to make the push operation working?
    Thanks!

  2. When you pop, it has to animate back so you have to wait for the anim to finish before pushing.

  3. #2
    Sencha User
    Join Date
    Mar 2012
    Location
    Berlin
    Posts
    43
    Answers
    1
    Vote Rating
    1
    diractor is on a distinguished road

      0  

    Default


    Are you sure that your navigationview variable holds a valid instance of an xtype navigationview? You can find out if you inspect it in the console:

    console.log(navigationview)

  4. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,668
    Answers
    3354
    Vote Rating
    746
    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


    When you pop, it has to animate back so you have to wait for the anim to finish before pushing.
    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. #4
    Sencha User
    Join Date
    Dec 2012
    Posts
    8
    Vote Rating
    0
    nodohoung is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    When you pop, it has to animate back so you have to wait for the anim to finish before pushing.
    That seems to be right as I think. I also spent my hours to find out how to resolve it but nothing found. I also tried the following code to test effects of animation but this works fine:
    Code:
    navigationview.push(view1);
    navigationview.push(view2);
    navigationview.push(view3);

  6. #5
    Sencha User
    Join Date
    Dec 2012
    Posts
    8
    Vote Rating
    0
    nodohoung is on a distinguished road

      0  

    Default


    Quote Originally Posted by diractor View Post
    Are you sure that your navigationview variable holds a valid instance of an xtype navigationview? You can find out if you inspect it in the console:

    console.log(navigationview)
    I'm sure that a valid navigationview object with xtype = 'navigationview' and I can push, pop views with it

  7. #6
    Sencha User
    Join Date
    Jul 2011
    Posts
    31
    Answers
    1
    Vote Rating
    0
    pvmagacho is on a distinguished road

      0  

    Default


    Try this:

    Code:
            navigationview.setAnimation({
                type: 'slide',
                duration: 200
            });
            var animation = navigationview.getAnimation();
    
            animation.on({
                        animationend: function() {
                            navigationview.push({xtype:'button', text:'New View'});
    },
    scope: navigationview, single: true }); navigationview.pop();

  8. #7
    Sencha User
    Join Date
    Dec 2012
    Posts
    8
    Vote Rating
    0
    nodohoung is on a distinguished road

      0  

    Default


    Thanks for your help. I finally used Container with card layout instead of NavigationView so I can avoid that problem.

  9. #8
    Sencha User
    Join Date
    Jul 2011
    Posts
    31
    Answers
    1
    Vote Rating
    0
    pvmagacho is on a distinguished road

      0  

    Default


    The solution pointed above can work with any container using card layout (which is the case of NavigationView). If you change the navigationView object to use your container it should work as well.

    Thanks

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar