1. #1
    Sencha User darren's Avatar
    Join Date
    Nov 2008
    Location
    Southern California
    Posts
    90
    Vote Rating
    0
    darren is on a distinguished road

      0  

    Default Is autoCreateViewport not working as intedned?

    Is autoCreateViewport not working as intedned?


    Hey all, temporarily I am using:
    Code:
    Ext.application({
        name: 'Advertiser',
        appFolder: '/js/Portal/Advertiser',
        launch: function () {
            Ext.create('Portal.Advertiser.view.Viewport');
        }
    });
    But I would like to use:
    Code:
    Ext.application({
        name: 'Advertiser',
        appFolder: '/js/Portal/Advertiser',
        autoCreateViewport: true
    });
    However nothing loads when trying to use autoCreateViewport. When I do the explicit create it loads.

    Here is my viewport:
    Code:
    Ext.define('Portal.Advertiser.view.Viewport', {
        extend: 'Ext.container.Viewport',
        layout: 'border',
        initComponent: function () {
            this.items = [{
                xtype: 'container',
                region: 'north',
                height: 100
            }, {
                xtype: 'container',
                region: 'west',
                width: 200,
                items: [{
                    xtype: 'panel',
                    html: 'Menu'
                }]
            }, {
                xtype: 'tabpanel',
                region: 'center',
                activeTab: 0,
                items: [{
                    xtype: 'panel',
                    title: 'Dashboard',
                    html: 'Coming soon'
                }]
            }];
    
    
            this.callParent();
        }
    });
    Can someone perhaps give me guidance on what I am doing wrong or is this a possible bug?

    Thanks
    "You only end up in the gutter if you live your life on the curb."

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Vote Rating
    438
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Perhaps try adding 'views'/requires property to application({}) to use autoCreateViewport?
    I believe that it is recommended to create then yourself anyway instead using autoCreateViewport. It was already removed from Touch2, Ext4 may follow, but I that is just a guess at this point.

    Regards,
    Scott.

Thread Participants: 1