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

      0  

    Default Unanswered: Ext.Viewport.removeAll(true, true); Fails Miserably on Android on HTC Inspire

    Unanswered: Ext.Viewport.removeAll(true, true); Fails Miserably on Android on HTC Inspire


    Where is my test panel? This example demonstrates the user is left with a blank page after removeAll(true, true); is executed. Apparently there is another bug that requires me to set _activeItem to null, but let's not fixate on that little detail. Let's discuss why the user does not see the new panel with the words "Test Panel" in the upper-left corner.

    By the way, this works fine in Chrome version 17.0.963.56 m

    Sencha Touch Version: rc2

    Code:
                   
                                Ext.Viewport.removeAll(true, true);          
                                Ext.Viewport._activeItem = null;
    
                                var newParentPanel = Ext.create('Ext.Container', {
                                    title: 'Test Container',
                                    fullscreen: true,
                                    layout: {
                                        type: 'vbox',
                                        align: 'stretch'
                                    },
    
                                    padding: '0 1 1 1',
                                    html: '<p>Test Panel</p>'
                                });
    
                                if (newParentPanel != null) {
    
                                    if (Ext.Viewport != null) {
                                        console.log('Viewport is not null.');
    
                                        if (Ext.Viewport.isReady) {
                                            console.log('Viewport is ready.');
                                            Ext.Viewport.setActiveItem(newParentPanel);
                                        }
                                    }
                                    else {
                                        console.log('Ext.Viewport is null.');
                                    }
                                }
    Dan
    Last edited by dotBomb; 4 Mar 2012 at 1:00 PM. Reason: More information provided ...

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,133
    Answers
    3504
    Vote Rating
    855
    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


    This is working for me in RC2 without setting the _activeItem to null hack. I see the newParentPanel container.
    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.

Thread Participants: 1