SnK*_*SnK 1 extjs sencha-touch-2
我目前正在从书中学习Sencha Touch.以下示例对我不起作用:
Ext.require('Ext.data.Store');
Ext.require('Ext.dataview.List');
Ext.require('Ext.MessageBox');
new Ext.application({
name: 'TouchStart',
launch: function() {
this.viewport = new Ext.Panel ({
fullscreen: true,
items: [{
docked: 'top',
xtype: 'toolbar',
ui: 'light',
items: [{
text: 'Panic',
handler: function(){
Ext.Msg.alert('Don\'t Panic!','Keep calm');
}
},
{
text:'Greetings',
handler: function() {
Ext.Msg.prompt('Greetings!','What is your name?',
function (btn,text){
var response = new Ext.MessageBox().show({
title: 'Howdy',
msg: 'Pleased to meet you ' + text,
});
});
}
}]
}]
});
}
});
Run Code Online (Sandbox Code Playgroud)
特别是:
new Ext.MessageBox().show({
title: 'Howdy',
msg: 'Pleased to meet you ' + text,
});
Run Code Online (Sandbox Code Playgroud)
当我运行它时,只显示标题,不显示任何消息:
谁知道为什么会这样?
试试这个:
new Ext.MessageBox().show({
title: 'Howdy',
message: 'Pleased to meet you ' + text,
});
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
8966 次 |
最近记录: |