AlertDialog
"click" callback fires wrong callback function. For example following code should print "Callback from Push 1" when you push Push1 button, and should print "Callback from Push 2" when you push Push2.
var win = Ti.UI.createWindow({layout:'vertical'});
var btn1 = Ti.UI.createButton({ title: 'Push 1' });
btn1.addEventListener('click', function (e) {
var dialog = Ti.UI.createAlertDialog({
message: 'Okay 1',
title: 'Alert Dialog Test 1'
});
dialog.addEventListener('click', function (e) {
Ti.API.info('Callback from Push 1');
});
dialog.show();
});
win.add(btn1);
var btn2 = Ti.UI.createButton({ title: 'Push 2' });
btn2.addEventListener('click', function (e) {
var dialog = Ti.UI.createAlertDialog({
message: 'Okay 2',
title: 'Alert Dialog Test 2'
});
dialog.addEventListener('click', function (e) {
Ti.API.info('Callback from Push 2');
});
dialog.show();
});
win.add(btn2);
win.open();
https://github.com/appcelerator/titanium_mobile_windows/pull/378
Verified the fix. Closing. Environment: Appc Studio: 4.1.1.201507141126 Ti SDK: 4.2.0.v20150724170431 Ti CLI: 4.0.1 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.1.0 APPC CLI: 4.1.2 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1