PDA

View Full Version : [DUP] Ext.device.notification.show with phonegap



gostbuster
29 Nov 2012, 3:03 AM
REQUIRED INFORMATIONExt version tested:

Sencha Touch 2.1
Browser versions tested against:
Packaged app android and iphone
Description:

reference error : butons is undefined
Steps to reproduce the problem:

foo
bar
Check Phonegap.jshere is the code I found in this file
show: function() { var config = this.callParent(arguments),
buttons = (config.buttons) ? config.buttons.join(',') : null,
onShowCallback = function(index) {
if (config.callback) {
config.callback.apply(config.scope, (config.buttons) ? [config.buttons[index - 1]].toLowerCase() : []);
}
};


// change Ext.MessageBox buttons into normal arrays
var ln = butons.length;
if (ln && typeof buttons[0] != "string") {
var newButtons = [],
i;


for (i = 0; i < ln; i++) {
newButtons.push(buttons[i].text);
}


buttons = newButtons;
}


navigator.notification.confirm(
config.message, // message
onShowCallback, // callback
config.title, // title
buttons // array of button names
);
},
I think butons should be buttons....

mitchellsimoens
29 Nov 2012, 10:18 AM
This has already been reported: http://www.sencha.com/forum/showthread.php?248789

The fix will be part of the next release.