PDA

View Full Version : [CLOSED] Ext.Msg.confim broken



mom_pece
17 Nov 2011, 6:34 AM
The callback returns undefined for the button param.

This is due to the

config.fn.call(
config.scope || null,
button.itemId || button.text,
config.input ? config.input.dom.value : null,
config
);

from the OnClick private method. Looks like you guys renamed itemId and text to private? _itemId and _text and only accessed them via getText() and so on setter/getter pattern.

But does that mean that you broke many other things that used to access the public members and should now be changed to use the accessors?

Why accessors anyway?

Jamie Avins
17 Nov 2011, 9:16 AM
Both of these issues have already been fixed for the next release.

netlogic
18 Nov 2011, 12:00 PM
Added the following workaround in my app.js so I could continue coding.




Ext.override(Ext.MessageBox, {
onClick: function(button) {
if (button) {
var config = button.userConfig || {};


if (typeof config.fn == 'function') {
config.fn.call(
config.scope || null,
// override to stop getting undefines
// button.itemId || button.text,
button.getItemId() || button.getText(),
config.input ? config.input.dom.value : null,
config
);
}


if (config.cls) {
this.el.removeCls(config.cls);
}


if (config.input) {
config.input.dom.blur();
}
}


this.hide();
}
} );




Regards,
Bret