Results 1 to 3 of 3

Thread: Blank canvas with phonegap 1.2

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1

    Default Blank canvas with phonegap 1.2

    Ok.. After thorough testing ST2PR2 does not work with phonegap 1.2 and XCode 4.2.1 - at least the card layout does not. It draws the DOM correctly but the final result is a totally blank screen.

    I have had numerous positioning and visibility issues with the card layout due to some bugs so perhaps this is related as well.

    My index.html:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    
    
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;"/>
        <meta charset="utf-8"/>
    
    
        <link rel="stylesheet" href="touch/resources/css/sencha-touch.css" type="text/css"/>
        <link rel="stylesheet" href="resources/css/app.css" type="text/css"/>
        <script type="text/javascript" src="touch/sencha-touch-all.js"></script>
        <script type="text/javascript" charset="utf-8" src="phonegap-1.2.0.js"></script>
        <script type="text/javascript" src="app/app.js"></script>
        <script src="http://localhost:8081/target/target-script-min.js#anonymous"></script>
        <script type="text/javascript">
    
    
    	function onBodyLoad()
    	{
    	    //for browser testing
    	   //onDeviceReady();
    
    
    	    //for phonegap
    		document.addEventListener("deviceready", onDeviceReady(), false);
    	}
    	function onDeviceReady() {
    	    Ext.application({
                name: 'Sencha',
                main: null,
               init: function() {
                    this.control({
                        '#switch': {
                            tap: this.onButton
                        },
                    }, null, this)
                },
                launch: function() {
                    var a = this;
                    a.main = Ext.create("Ext.Panel", {
                        fullscreen: true,
                        layout: 'card',
                        xtype: 'mypanel',
                        items: [
                            {
                            title: 'Home',
                            iconCls: 'home',
                            cls: 'home',
                            html: 'home page',
                        },
                        {
                            title: 'Contact',
                            iconCls: 'user',
                            xtype: 'formpanel',
                            url: 'contact.php',
                            layout: 'vbox',
                            items: [
                               {
                                xtype: 'fieldset',
                                title: 'Contact Us',
                                instructions: '(email address is optional)',
                                items: [
                                    {
                                        xtype: 'textfield',
                                        label: 'Name'
                                    },
                                    {
                                        xtype: 'emailfield',
                                        label: 'Email'
                                    },
                                    {
                                        xtype: 'textareafield',
                                        label: 'Message'
                                    }
                                ]
                            },
                            {
                                xtype: 'button',
                                itemId: 'switch',
                                id: 'switch',
                                text: 'Send',
                                ui: 'confirm',
                            }
                            ]
                        }
                        ]
                    });
    
    
                    this.main.setActiveItem(1);
                },
                onButton: function() {
                    this.main.setActiveItem(0);
                }
            });
        }
    	
    
    
        </script>
      </head>
      <body onload="onBodyLoad()"></body>
    </html>
    Last edited by cyberwombat; 27 Nov 2011 at 1:10 PM. Reason: Testing complete

  2. #2

    Default

    Note that I tested the css location so I know the css is loading correctly

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    Dupe: http://www.sencha.com/forum/showthre...light=phonegap

    Lets keep it in one thread please.

    Sencha Inc

    Jamie Avins

    @jamieavins

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •