我目前正在从一本书中学习 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,
});
});
}
}]
}]
});
}
});
特别是:
new Ext.MessageBox().show({
title: 'Howdy',
msg: 'Pleased to meet you ' + text,
});
当我运行它时,只显示标题,不显示任何消息:
任何人都知道为什么会这样?