Reputation: 528
I'm currently learning Sencha Touch from a book. Following the example doesn't work for me:
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,
});
});
}
}]
}]
});
}
});
And in particular:
new Ext.MessageBox().show({
title: 'Howdy',
msg: 'Pleased to meet you ' + text,
});
When I run this, only the title shows, no message is shown:
Anyone knows why this is happening?
Upvotes: 1
Views: 9764
Reputation: 172
Try this:
new Ext.MessageBox().show({
title: 'Howdy',
message: 'Pleased to meet you ' + text,
});
Upvotes: 5