Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1755 in a recent build.
  1. #1
    Sencha User jlyman's Avatar
    Join Date
    Nov 2010
    Posts
    28
    Vote Rating
    0
    jlyman is on a distinguished road

      0  

    Default Schedule next MessageBox to appear

    Schedule next MessageBox to appear


    I'm running into an issue where my app may try to call a new MessageBox.prompt while another one is still disappearing (doing its exit animation). For example, the prompt asks for an input, and if the input is invalid, then the prompt should come up again to get a better value. The first prompt shows up just fine, but the second one never shows up, even though the code is fired.

    This worked fine in PR3/4, but now that B1 has reinstated animations it seems to no longer work. Is this due to the singleton nature of MsgBox, or something else? How can one go about getting that second prompt to show up correctly?

  2. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    This looks like a bug in beta 1 - sorry about that.

    To quickly get around it, you could add a setTimeout() of 500ms inside your callback function and then do whatever you need to do in there.

    It's tacky, but it will work until the bug is fixed.

    Thanks!
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  3. #3
    Sencha User jlyman's Avatar
    Join Date
    Nov 2010
    Posts
    28
    Vote Rating
    0
    jlyman is on a distinguished road

      0  

    Default


    Gotchya. Thanks for filing the bug, and for the workaround!

    I know we don't talk release dates around here, but PR4 was a very short release. Is B1 more like that, or a longer test? Or can you say? ;-)

  4. #4
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    We are aiming for a release every week.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  5. #5
    Sencha User jlyman's Avatar
    Join Date
    Nov 2010
    Posts
    28
    Vote Rating
    0
    jlyman is on a distinguished road

      0  

    Default


    Great news! Thanks Sencha Touch team.

  6. #6
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Here is an override for the issue:

    Code:
    Ext.define('Ext.overrides.messagebox.CallbackIssues', {
        override: 'Ext.MessageBox',
    
        // pass `fn` config to show method instead
        onClick: function(button) {
            if (button) {
                var config = button.config.userConfig || {},
                    initialConfig = button.getInitialConfig(),
                    prompt = this.getPrompt();
    
                if (typeof config.fn == 'function') {
                    this.on({
                        hiddenchange: function() {
                            config.fn.call(
                                config.scope || null,
                                initialConfig.itemId || initialConfig.text,
                                prompt ? prompt.getValue() : null,
                                config
                            );
                        },
                        single: true,
                        scope: this
                    });
                }
    
                if (config.cls) {
                        this.el.removeCls(config.cls);
                    }
    
                if (config.input) {
                    config.input.dom.blur();
                }
            }
    
            this.hide();
        }
    });
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Thread Participants: 1

Tags for this Thread