简体   繁体   中英

Web app sencha touch error

I have some problems in this part of JavaScript code in Sencha Touch, and I don't know how to resolve it.

new Ext.application({
  name: 'TouchStart',
  launch: function() {    
    this.viewport = new Ext.Panel({
      fullscreen: true,
      bodyPadding: 5,
      dockedItems: [            {
        dock : 'top',
        xtype: 'toolbar',
        title: 'Touch Start'
      }, {
        dock : 'top',
        xtype: 'toolbar',
        items: [{
            text: 'Hello Button'
        }]
      }],    
      html: 'Hello Panel'
    });
  }
});

The console shows:

This.viewport = new Ext.Panel({
> Uncaught TypeError: undefined is not a function

萨拉姆,您必须将代码Ext.Panel更改为Ext.create('Ext.Panel',...........

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM