1. #1
    Touch Premium Member
    Join Date
    Feb 2011
    Location
    San Diego, CA
    Posts
    43
    Vote Rating
    4
    tinyfactory is on a distinguished road

      0  

    Default PR4: Ext.application autoCreateViewport gone?

    PR4: Ext.application autoCreateViewport gone?


    Using PR3, we had autoCreateViewport, but it does not appear to be working in last night's release. I also don't see it in the docs, but there was no mention of it being removed in the release notes. Is this gone temporarily, or permanently?

    Thanks for the great work! ST2 is much improved over ST1.

    Alex

  2. #2
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Hey Alex, looks like I forgot the deprecation warning on this one. I've taken autoCreateViewport out because it was not really adding any value (replacing a 1-liner with another 1-liner), was confusing some people and also breaks the definition of what the Viewport class does in Sencha Touch 2.

    I'll add a warning into the Application class that tells you how to get around this, but basically you just need to have a launch function in your application:

    Code:
    Ext.application({
        launch: function() {
            Ext.create('MyApp.view.Main');
        }
    });
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  3. #3
    Touch Premium Member
    Join Date
    Feb 2011
    Location
    San Diego, CA
    Posts
    43
    Vote Rating
    4
    tinyfactory is on a distinguished road

      0  

    Default


    Thanks for the quick response! I can live with that ;-)

    I also found a reference in the Viewport class in the docs, but I'm not sure if there is any value add:

    Code:
    Ext.application({
        viewport:{        
             xclass:'MyApp.view.Viewport'
        },    
        launch:function(){//do something}
    });
    
    Thanks for the help

  4. #4
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    You probably shouldn't do that, as it removes all the special viewport functionality that is in Ext.viewport.Default, Ext.viewport.Ios and Ext.viewport.Android.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  5. #5
    Touch Premium Member
    Join Date
    Jan 2012
    Posts
    17
    Vote Rating
    0
    lrobins is on a distinguished road

      0  

    Default


    I tried using

    Code:
    Ext.application({    launch: function() {        Ext.create('MyApp.view.Main');    }});
    But I get a blank screen, no warnings or errors. If I were to take what is defined in the MyApp.view.Main and call that in the application launch it works, for example:

    Code:
    Ext.application({    launch: function() {        Ext.create('Ext.Container', {            fullscreen: true,
                html: 'HELLO WORLD!'
            });
    What am I missing?

  6. #6
    Touch Premium Member
    Join Date
    Jan 2012
    Posts
    17
    Vote Rating
    0
    lrobins is on a distinguished road

      0  

    Default


    Found my problem, I had

    Code:
    initialize: function () {
            console.log('initialize main view');
        }
    in my main view. I removed it and it works as expected.

  7. #7
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    To make that work you'll just need to make sure you callParent from you initialize function:

    Code:
    initialize: function() {
        this.callParent(arguments);
    
        console.log('initialize main view');
    }
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

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