SnK
SnK

Reputation: 528

Ext.MessageBox.show() doesn't show message

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:

problem

Anyone knows why this is happening?

Upvotes: 1

Views: 9764

Answers (1)

Fbo
Fbo

Reputation: 172

Try this:

new Ext.MessageBox().show({
   title: 'Howdy',
   message: 'Pleased to meet you ' + text,
});

Upvotes: 5

Related Questions