Sencha touch 2 如何获得参考资料并采取行动?Sencha Touch 2.0

Sencha touch 2 如何获得参考资料并采取行动?Sencha Touch 2.0,sencha-touch-2,Sencha Touch 2,代码如下所示。我正在尝试实现一个简单的聊天应用程序,这里的列表是MSG的内存存储。我发现在this.getMsgList().add([myPanel])之后列表中仍然没有新项 我正在寻找正确的方法来获取msgList引用并添加新的引用(希望是imm) })) msgList的定义如下: Ext.define('Chat.view.MainView', { extend: 'Ext.Panel', config: { layout: { type: 'fit'

代码如下所示。我正在尝试实现一个简单的聊天应用程序,这里的列表是MSG的内存存储。我发现在
this.getMsgList().add([myPanel])之后列表中仍然没有新项

我正在寻找正确的方法来获取msgList引用并添加新的引用(希望是imm)

}))

msgList的定义如下:

Ext.define('Chat.view.MainView', {
extend: 'Ext.Panel',

config: {

    layout: {
        type: 'fit'
    },

    items: [
        {
            docked: 'top',
            xtype: 'titlebar',
            title: 'Chat'
        },
        {
            docked: 'bottom',
            xtype: 'toolbar',
            items: [
                { 
                    xtype: 'textfield', 
                    id: 'msgBox'
                },
                { 
                    xtype: 'button',
                    ui: 'confirm',
                    text: 'send',
                    action: 'submitMsg'
                }
            ]
        },
        {
            xtype: 'list',
            id: 'msgList',
            itemTpl: [
                '<div>List Item {string}</div>'
            ],
            data: [
                        { string: 'Item 1' },
                        { string: 'Item 2' }
            ]
        }
    ]


}
Ext.define('Chat.view.MainView'{
扩展:“Ext.Panel”,
配置:{
布局:{
类型:“适合”
},
项目:[
{
停靠:“顶部”,
xtype:'标题栏',
标题:“聊天”
},
{
停靠:“底部”,
xtype:'工具栏',
项目:[
{ 
xtype:'textfield',
id:'msgBox'
},
{ 
xtype:'按钮',
ui:'确认',
文本:“发送”,
动作:“提交TMSG”
}
]
},
{
xtype:'列表',
id:'msgList',
第三方物流:[
'列表项{string}'
],
数据:[
{string:'Item 1'},
{string:'项目2'}
]
}
]
}
}))

Ext.define('Chat.view.MainView', {
extend: 'Ext.Panel',

config: {

    layout: {
        type: 'fit'
    },

    items: [
        {
            docked: 'top',
            xtype: 'titlebar',
            title: 'Chat'
        },
        {
            docked: 'bottom',
            xtype: 'toolbar',
            items: [
                { 
                    xtype: 'textfield', 
                    id: 'msgBox'
                },
                { 
                    xtype: 'button',
                    ui: 'confirm',
                    text: 'send',
                    action: 'submitMsg'
                }
            ]
        },
        {
            xtype: 'list',
            id: 'msgList',
            itemTpl: [
                '<div>List Item {string}</div>'
            ],
            data: [
                        { string: 'Item 1' },
                        { string: 'Item 2' }
            ]
        }
    ]


}