lib/Ext/MessageBox.js
function(initialConfig) {
        Ext.util.InputBlocker.blockInputs();
        //if it has not been added to a container, add it to the Viewport.
        if (!this.getParent() && Ext.Viewport) {
            Ext.Viewport.add(this);
        }

        if (!initialConfig) {
            return this.callParent();
        }

        var config = Ext.Object.merge({}, {
            value: ''
        }, initialConfig);

        var buttons        = initialConfig.buttons || Ext.MessageBox.OK || [],
            buttonBarItems = [],
            userConfig     = initialConfig;

        Ext.each(buttons, function(buttonConfig) {
            if (!buttonConfig) {
                return;
            }

            buttonBarItems.push(Ext.apply({
                userConfig: userConfig,
                scope     : this,
                handler   : 'onClick'
            }, buttonConfig));
        }, this);

        config.buttons = buttonBarItems;

        if (config.promptConfig) {
            //<debug warn>
            Ext.Logger.deprecate("'promptConfig' config is deprecated, please use 'prompt' config instead", this);
            //</debug>
        }
        config.prompt = (config.promptConfig || config.prompt) || null;

        if (config.multiLine) {
            config.prompt = config.prompt || {};
            config.prompt.multiLine = config.multiLine;
            delete config.multiLine;
        }

        config = Ext.merge({}, this.defaultAllowedConfig, config);

        this.setConfig(config);

        var prompt = this.getPrompt();
        if (prompt) {
            prompt.setValue(initialConfig.value || '');
        }

        this.callParent();

        return this;
    }
function(initialConfig) {
        Ext.util.InputBlocker.blockInputs();
        //if it has not been added to a container, add it to the Viewport.
        if (!this.getParent() && Ext.Viewport) {
            Ext.Viewport.add(this);
        }

        if (!initialConfig) {
            return this.callParent();
        }

        var config = Ext.Object.merge({}, {
            value: ''
        }, initialConfig);

        var buttons        = initialConfig.buttons || Ext.MessageBox.OK || [],
            buttonBarItems = [],
            userConfig     = initialConfig;

        Ext.each(buttons, function(buttonConfig) {
            if (!buttonConfig) {
                return;
            }

            buttonBarItems.push(Ext.apply({
                userConfig: userConfig,
                scope     : this,
                handler   : 'onClick'
            }, buttonConfig));
        }, this);

        config.buttons = buttonBarItems;

        if (config.promptConfig) {
            //<debug warn>
            Ext.Logger.deprecate("'promptConfig' config is deprecated, please use 'prompt' config instead", this);
            //</debug>
        }
        config.prompt = (config.promptConfig || config.prompt) || null;

        if (config.multiLine) {
            config.prompt = config.prompt || {};
            config.prompt.multiLine = config.multiLine;
            delete config.multiLine;
        }

        config = Ext.merge({}, this.defaultAllowedConfig, config);

        this.setConfig(config);

        var prompt = this.getPrompt();
        if (prompt) {
            prompt.setValue(initialConfig.value || '');
        }

        this.callParent();

        return this;
    }
Displays the {@link Ext.MessageBox} with a specified configuration. All
display functions (e.g. {@link #method-prompt}, {@link #alert}, {@link #confirm})
on MessageBox call this function internally, although those calls
are basic shortcuts and do not support all of the config options allowed here.

Example usage:

@example
Ext.Msg.show({
title: 'Address',
message: 'Please enter your address:',
width: 300,
buttons: Ext.MessageBox.OKCANCEL,
multiLine: true,
prompt : { maxlength : 180, autocapitalize : true },
fn: function(buttonId) {
alert('You pressed the "' + buttonId + '" button.');
}
});

@param {Object} config An object with the following config options:

@param {Object/Array} [config.buttons=false]
A button config object or Array of the same(e.g., `Ext.MessageBox.OKCANCEL` or `{text:'Foo', itemId:'cancel'}`),
or false to not show any buttons.

@param {String} config.cls
A custom CSS class to apply to the message box's container element.

@param {Function} config.fn
A callback function which is called when the dialog is dismissed by clicking on the configured buttons.

@param {String} config.fn.buttonId The `itemId` of the button pressed, one of: 'ok', 'yes', 'no', 'cancel'.
@param {String} config.fn.value Value of the input field if either `prompt` or `multiline` option is `true`.
@param {Object} config.fn.opt The config object passed to show.

@param {Number} [config.width=auto]
A fixed width for the MessageBox.

@param {Number} [config.height=auto]
A fixed height for the MessageBox.

@param {Object} config.scope
The scope of the callback function

@param {String} config.icon
A CSS class that provides a background image to be used as the body icon for the dialog
(e.g. Ext.MessageBox.WARNING or 'custom-class').

@param {Boolean} [config.modal=true]
`false` to allow user interaction with the page while the message box is displayed.

@param {String} [config.message=&#160;]
A string that will replace the existing message box body text.
Defaults to the XHTML-compliant non-breaking space character `&#160;`.

@param {Number} [config.defaultTextHeight=75]
The default height in pixels of the message box's multiline textarea if displayed.

@param {Boolean} [config.prompt=false]
`true` to prompt the user to enter single-line text. Please view the {@link Ext.MessageBox#method-prompt} documentation in {@link Ext.MessageBox}.
for more information.

@param {Boolean} [config.multiline=false]
`true` to prompt the user to enter multi-line text.

@param {String} config.title
The title text.

@param {String} config.value
The string value to set into the active textbox element if displayed.

@return {Ext.MessageBox} this