Results 1 to 2 of 2

Thread: Ext.MessageBox.Wait

  1. #1
    Sencha User
    Join Date
    Jul 2014
    Posts
    7

    Default Ext.MessageBox.Wait

    Hi guys,
    i'm using ext 3.4.

    I've a function that spent time to do a synchronize operation.

    I'd like to show a wait message during the operation like below example

    Code:
    function test()
    {
      Ext.MessageBox.wait('Loading, 'wait');
      // My Operation
      Ext.MessageBox.wait('Loading, 'wait').hide();
    }
    The problem is that the wait Message is never shown because the framework render the object only when the function ends. This means that the wait message is shown and hidden but uselessly.

    I found this solution but is there a better way?
    Code:
              function test()
              {
                show();
                setTimeout(test2, 0);
              }
              function test2()
              {
                  // My Operation
                hide();
              }

  2. #2
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,501
    Answers
    13

    Default

    The only way when your operation is asynchronous, Ajax call for example:

    Code:
    var win = Ext.MessageBox.wait('Loading, 'wait');
    Ext.Ajax.request({
      ...
      callback: function() {
        win.hide();
      }
    });

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •