1. #1
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    19
    Vote Rating
    2
    Mark R is on a distinguished road

      0  

    Default Unanswered: items and dockedItems config properties valid for MessageBox?

    Unanswered: items and dockedItems config properties valid for MessageBox?


    I've tried to create Ext.window.MessageBox and specify "items" via config passed in, and it seems that it doesn't get used. Same result when I tried "dockedItems".

    When I looked at the source for MessageBox, it looked like both of these properties were overridden there, so it wouldn't matter what was passed in. Curious if I'm misunderstanding.

    The docs at http://docs.sencha.com/ext-js/4-1/#!...dow.MessageBox seem to show these both as valid properties, and I've used these properties for other Panels and Windows, but not for MessageBoxes.

    I'm using version 4.1.3.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,533
    Vote Rating
    871
    Answers
    3565
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    MessageBox is an extension of Window so it technically could support it but the show method on MessageBox reconfigures the MessageBox. You could just use your own Window.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Dec 2012
    Posts
    19
    Vote Rating
    2
    Mark R is on a distinguished road

      0  

    Default


    I was able to get around it by saving the message box to a variable (var errorMessageBox = new Ext.window.MessageBox();) and then calling errorMessageBox.items.add() before calling errorMessageBox.show(). Seems a little awkward, but what I was trying to create was a small "Show details" panel inside of the message box, and stow technical error messages in there. MessageBox was still what I wanted to use because I wanted it to look like an error-message dialog, since it still is one, even with the added panel.

    The basic question that remains, is shouldn't the documentation omit these config items from the MessageBox documentation (if possible), or indicate that these config items don't apply to MessageBox? I could submit this to the Bugs forum but wanted to ask around here first.
    Last edited by Mark R; 3 Jan 2013 at 9:54 AM. Reason: disabled smilies

Thread Participants: 1

Tags for this Thread