31 Dec 2012 12:08 PM #1
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 Jan 2013 8:33 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
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 @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
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.
2 Jan 2013 1:09 PM #3
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