1. #1
    Sencha Premium Member Carlos.D's Avatar
    Join Date
    Nov 2011
    Location
    Luxembourg
    Posts
    38
    Vote Rating
    1
    Carlos.D is on a distinguished road

      0  

    Default PhoneGap white screen "onLaunch" in a Controller

    PhoneGap white screen "onLaunch" in a Controller


    Hi,

    When you build a panel an onLaunch in a Controller only a white screen appear with PhoneGap, but works fine in a browser, sample :


    app/app.js:

    Code:
    Ext.Loader.setConfig({ enabled: true });
    
    
    Ext.application({
        name: 'Test',
        controllers: ['Control']
        
    });

    app/controller/control.js:

    Code:
    Ext.define('Test.controller.Control', {
        extend: 'Ext.app.Controller',	
        
        
        onLaunch: function() {
        	
        	var panel = Ext.create('Ext.Panel', {
     		   
    
    
    		    items: [
    		        {
    		            dock : 'top',
    		            xtype: 'toolbar',
    		            title: 'Standard Titlebar'
    		        },
    		        {
    		            dock : 'top',
    		            xtype: 'toolbar',
    		            ui   : 'light',
    		            items: [
    		                {
    		                    text: 'Test Button'
    		                }
    		            ]
    		        }
    		    ],
    
    
    		    html: 'Testing'
    		});
    		
    		
    		Ext.Viewport.add(panel);
    		Ext.Viewport.setActiveItem(0);
    
    
        }
    });
    Any solution ? Perhaps can we said to the controller "wait for PhoneGap" ?

    Thx

  2. #2
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    187
    Vote Rating
    3
    olouvignes is on a distinguished road

      0  

    Default


    Are you using IOS4.3 or IOS5 in the simulator ?

  3. #3
    Sencha Premium Member Carlos.D's Avatar
    Join Date
    Nov 2011
    Location
    Luxembourg
    Posts
    38
    Vote Rating
    1
    Carlos.D is on a distinguished road

      0  

    Default


    Sorry, it's for an Android app. I'm trying with the 3.2 API level.

  4. #4
    Sencha Premium Member Carlos.D's Avatar
    Join Date
    Nov 2011
    Location
    Luxembourg
    Posts
    38
    Vote Rating
    1
    Carlos.D is on a distinguished road

      0  

    Default


    But any suggestion would be appreciated...

  5. #5
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    187
    Vote Rating
    3
    olouvignes is on a distinguished road

      0  

    Default


    Check if the "deviceready" event is correctly fired, which ST2.0 version do you use?

  6. #6
    Sencha Premium Member Carlos.D's Avatar
    Join Date
    Nov 2011
    Location
    Luxembourg
    Posts
    38
    Vote Rating
    1
    Carlos.D is on a distinguished road

      0  

    Default


    I'm not aware about this "device ready event", can you show me a sample ?
    I'm using ST2 PR2.

    Thx


  7. #7
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    187
    Vote Rating
    3
    olouvignes is on a distinguished road

      0  

    Default


    It is a phonegap event that ST2.0pr2 waits to start. It seems broken.
    Try to apply the patch there:
    https://github.com/mgcrea/sencha-tou...3cd9719057a0a4

  8. #8
    Sencha Premium Member
    Join Date
    Oct 2011
    Location
    Paris, France
    Posts
    187
    Vote Rating
    3
    olouvignes is on a distinguished road

      0  

    Default


    Hum, since your on android, that won't work. Try to add sth like this in your html:

    Code:
    <script type="text/javascript">
            document.addEventListener("deviceready", function() {
    			console.warn('deviceready!');
    		});
        </script>

  9. #9
    Sencha Premium Member Carlos.D's Avatar
    Join Date
    Nov 2011
    Location
    Luxembourg
    Posts
    38
    Vote Rating
    1
    Carlos.D is on a distinguished road

      0  

    Default


    Finally it's seems to work with this patch ! Do you know where can I find mimimized file ? ST2 team already know the bug ?

    Thank you Olouvignes.


    Guys be careful with the casse "control.js != Control.js"...

  10. #10
    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


    So, Ext.os.deviceType on Android is Desktop?
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 2

Tags for this Thread

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