1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    47
    Vote Rating
    0
    borden0108 is on a distinguished road

      0  

    Default app will not load

    app will not load


    My app just shows a blank screen. there is no html code when it renders and just a white screen.
    there are no errors either. My request for a file is executed but there is no display by the browser?

    I need some help on this please

    thanks matt

    Code:
    Ext.setup({// When the program has rendered the above code it will now start the code below.
        onReady: function() {
    
    
            
            Ext.define("timetable", {extend: "Ext.data.Model", fields: [
                    {name: 'DayNumber', type: 'string'},
                    {name: 'PeriodNumber', type: 'string'},
                    {name: 'PeriodNumberSeq', type: 'string'},
                    {name: 'DefinitionPeriodNumber', type: 'string'},
                    {name: 'DefinitionTimeFrom', type: 'string'},
                    {name: 'DefinitionTimeTo', type: 'string'},
                    {name: 'ClassCode', type: 'string'},
                    {name: 'ClassDescription', type: 'string'},
                    {name: 'StaffID', type: 'string'},
                    {name: 'Room', type: 'string'},
                ],
                proxy: {
                    type: 'localstorage',
                    id: 'modelproxy',
                  }
            });
            
                var calculateDesiredWidth = function() {
                    var viewWidth = Ext.Element.getViewportWidth(),
                        desiredWidth = Math.min(viewWidth, 400) - 10;
                            return desiredWidth;
                };
    
    
    
    
    authform = Ext.create(Ext.form.FormPanel,{
                id: 'infomation',
                layout: 'fit',
                method:'post',
                centered:true,
                url:'https://intranet.trinity.vic.edu.au/CookieAuth.dll?Logon',
                width: 400,
                standardSubmit : true,
                scroll:'vertical',
                floating: true,
                modal: true,
                height:300,
                items:[{
                    xtype: 'fieldset',
                    width: calculateDesiredWidth,
                    title: 'Login',
                    instructions: 'Please complete the information.',
                items: [{
                            name: 'username',
                            label: 'username',
                            xtype: 'textfield',
                            cls:'form-height',
                        },{
                            name: 'password',
                            label: 'password',
                            xtype: 'passwordfield',
                            cls:'form-height',
                        },{
                            xtype: 'hiddenfield',
                            name:'curl',
                            value:'Z2Fdefault.asp',
                        }],
                    }],
                dockedItems: [{
                    dock: 'top',
                    xtype: 'toolbar',
                        title: 'Intranet Login'
                    },{
                    dock: 'bottom',
                    xtype: 'toolbar',
                    items: [{
                            text: 'Cancel',
                            handler: function() {
                                authform.hide();
                            }
                        },{
                            xtype: 'spacer'
                        },{
                        text: 'Submit',
                        ui:'confirm',
                         handler: function() {
                           authform.submit ({
                                waitMsg:'Submitting',
                                 success: function(e) {
                                    authform.hide();
                                    window.stop();
                                }
    
    
                            });
                        },
                    }],
                }]
            });
    
    
    
    
            var editBtn = Ext.create(Ext.Button,{
                text: 'Settings',
                handler: function() {
                    authform.show();
                }
            });
            var spinner = Ext.create(Ext.form.Spinner,{ 
            minValue: 0,
                maxValue: 100,
                incrementValue: 2,
                cycle: true
            });
    
    
            var spinnerBtn = Ext.create(Ext.Button,{
                text: 'Select Day',
                handler: function() {
                    spinner.show();
                }
            });
        
    
    
    
    
            var offlineStore = Ext.create(Ext.data.Store,{
                                    autoLoad:false,
                                    model: 'timetable',
                                    proxy: {
                                        type: 'localstorage',
                                        id: 'helloworld'
                                    }
                                });
            
            
            var onlineStore = Ext.create(Ext.data.Store,{
                            model: 'timetable',
                            method:'GET',
                            autoLoad: true,
                            proxy: {
                                type: 'jsonp',
                                url : 'https://intranet.trinity.vic.edu.au/timetable/getTimetable.asp',
                                extraParams: {
                                        synID:300068,
                                        room:0,
                                        year:YearNumber(),
                                        term:TermNumber(),
                                        day:DayNumber(),
                                        callType:'student'
                                    },
                                        timeout: 2000,
                                        listeners: {
                                               exception: {
                                                        fn: function(proxy, response, operation ) {
                                                            offlineStore.load();
                                                            offlineStore.sync();
                                                        }
                                                    }
                                                }
                                }
                            });
    
    
                        var panel = Ext.create(Ext.Panel, {
                                layout: 'fit',
                                html:'hello',
                                items:[{ 
                                        title:'Timetable',
                                        xtype:'list',
                                        store:onlineStore,
                                        itemSelector:'list',
                                        itemTpl: '<tpl>'+'Period {title}: {class}' + '<div id="teacher">{teacher}</div>' + '<div id="room">{room}</div>' +  '</tpl>' ,
                                    }]
                        });
                    },            
            });

  2. #2
    Touch Premium Member
    Join Date
    Jun 2010
    Posts
    324
    Vote Rating
    2
    profunctional is on a distinguished road

      0  

    Default


    Same prob here. I spent hours upgrading to 2.0 by updating everything that was deprecated. Now the screen just goes blank after it loads. I have stepped through and every class is indeed loaded. I came to the conclusion that going from 1.1 to 2.0 is more of a complete re-write than a simple upgrade.

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    47
    Vote Rating
    0
    borden0108 is on a distinguished road

      0  

    Default fixed

    fixed


    i just copied the code from the http://docs.sencha.com/touch/2-0/tou...sel/index.html and made a carousel i then went through and changed the code to suit my self. i added parts of my app in. it only took ten minutes to do this.

    copy the sencha-touch-all.js contents into a new file and the contents of the css file as thay change from version to version.

    best of luck matt

  4. #4
    Sencha User
    Join Date
    Jan 2008
    Location
    Atlanta, GA
    Posts
    15
    Vote Rating
    0
    allenerb is on a distinguished road

      0  

    Default


    Did you guys ever figure out what it was? I'm in the process of trying to update a 1.1.x app to 2.0 beta 4 and I'm having exactly the same problem. I got rid of all the errors, warnings, etc. Now, when I try to load the app, I get a blank screen. Here's the crazy part though. When I'm trying to include a file by adding it to the viewport, this is when I get nothing. However, if, in the file that I'm trying to load, I set the html attribute and put some stuff in there, I'll actually get back the html and it will show on the screen. I'm about to lose all my patience with this. I'm just hoping you guys might have found what it was that was causing your problem?

    Thanks,
    Allen

Thread Participants: 2