1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    46
    Vote Rating
    0
    jsweere is on a distinguished road

      0  

    Default Unanswered: To push, pop, then push a carousel in a navigation view

    Unanswered: To push, pop, then push a carousel in a navigation view


    For some reason, the navigation view breaks the carousel. In the case I'm encountering, I have a Navigation View which has several buttons. The handler for each button creates a card which I have defined, and pushes it into the view. This works fine. Everything is as it should be at this point. I have a toolbar with a back button that pops back to the main screen of the Navigation View. If I click the button again, the navigation view pushes in carousel, but the carousel's items aren't showing. I have tried this using both the sencha-touch-all-debug.js and the sencha-touch-all.js files and got the same result. Help would be greatly appreciated.

    Thanks,
    Joe

    ps. It only happens when debugging on a phone.
    Last edited by jsweere; 29 Mar 2012 at 12:37 PM. Reason: add ps

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Location
    Plymouth, UK
    Posts
    137
    Answers
    5
    Vote Rating
    -2
    simondavies has a little shameless behaviour in the past

      0  

    Default


    I find that when I have the developer set to on on the iPhone, this causes no end of trouble with what I am trying to do, and the hours i have spent trying to sort an issue out that turns out to be ok, when it is turned of, so using alert or msg to display a console message is annoying but necessary.

    Are you using an iPhone and if so is the developer set to on, if not then this remark is futile :-) but thought a mention.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    46
    Vote Rating
    0
    jsweere is on a distinguished road

      0  

    Default


    I am actually debugging for Android, but will be doing an iPhone version once I'm finished. In any case, thanks for the reply. It only seems to go wrong with the carousel.

  4. #4
    Sencha User
    Join Date
    Oct 2010
    Location
    Knoxville, TN
    Posts
    133
    Answers
    1
    Vote Rating
    1
    Kcarpenter is on a distinguished road

      0  

    Default


    I am pushing a carousel to the nav view in my app and don't seem to have any problems. But when I first got started the "fullscreen" property screwed me over several times. If your navigation view is set to fullscreen: true, make sure your carousel isn't. Thats how mine is setup and it works.

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    15
    Vote Rating
    0
    neutr0n is on a distinguished road

      0  

    Default Same Problem

    Same Problem


    Hi
    I got the same problem with the navigation.View and the Carousel.

    I push the Carousel to the navigation.View and when i return, the back button doesnt disapear and I got an error when i click the back button at the carousel:

    Uncaught TypeError: Cannot read property 'parentNode' of undefined at file:///android_asset/www/touch/sencha-touch-all-debug.js:11948

    Carousel:
    Code:
    Ext.define('myapp.view.IdeaImagesCarousel', {
        extend: 'Ext.Carousel',
        xtype: 'ideaimagescarousel',
        
        config: {
            defaults: {
                styleHtmlContent: true
            },
            fullscreen: false,
            
            items: [
                {
                    html: '<p>halllloooo 1</p>'
                },
                {
                    html: '<p>halllloooo 2</p>'
                },
                {
                    html: '<p>halllloooo 3</p>'
                }
            ]
        }
        
    });
    Button:
    Code:
    {
           xtype: 'button',
           cls:         'fotoButton',
           text:         'Fotos',
           handler:     function(btn, e) {
                viewport.push({
                      xtype: 'ideaimagescarousel',
                      title: 'Fotos',
                });
           }
    }
    is there a workaround or something?

    Thanks in advance

  6. #6
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    like_itus is on a distinguished road

      0  

    Default


    Hello,
    I have the same issue.
    Did anybody solve the problem?

  7. #7
    Sencha User
    Join Date
    Jan 2012
    Posts
    46
    Vote Rating
    0
    jsweere is on a distinguished road

      0  

    Default


    I managed to get this working. If you don't use the stock navigation bar that comes on a nav view, and use your own toolbar with your own buttons, (you can use the class: 'x-button-back' to get the pointed back button). Use push() to change to a new view and pop() to go back. Then to solve the problem with the items of a carousel not rendering properly when you make your attempts to push it, I created the carousel in the app, and never destroyed it. Instead, anytime I went to push the view containing the carousel, I simply added it to the view I was pushing in. Basically, you never destroy the carousel on a pop, just the rest of the view.

  8. #8
    Sencha User
    Join Date
    Dec 2011
    Posts
    2
    Vote Rating
    0
    like_itus is on a distinguished road

      0  

    Default


    Hello,
    I upgraded my ST from 2.0.0 to 2.0.1
    It works fine now.

  9. #9
    Sencha User
    Join Date
    Mar 2012
    Posts
    15
    Vote Rating
    0
    neutr0n is on a distinguished road

      0  

    Default


    Hello

    Jap, it works with version 2.0.1

    ​Thx