Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13564] BlackBerry : We get same index for 'OK' & 'Cancel' button on an alert dialog

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-04-22T23:46:22.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 09 BB, 2013 Sprint 09, Release 3.2.0
ComponentsBlackBerry
Labelsqe-testadded, sdk-bb
ReporterLokesh Choudhary
AssigneeJosh Roesslein
Created2013-04-15T20:17:41.000+0000
Updated2014-06-19T12:43:48.000+0000

Description

Description: 1. Create an app for BB 2. Replace the code in the app.ja with the following code:
Ti.API.info('running');
 
var win = Ti.UI.createWindow({backgroundColor: 'red'});
win.open();
 
function showAlert() {
    Ti.API.info('opening alert...');
    var alert1 = Ti.UI.createAlertDialog({
        title: 'Click a button...'
    });
    alert1.addEventListener('click', function(e) {
        alert('index = ' + e.index);
    });
    alert1.show();
}
 
setTimeout(showAlert, 2000);
2. Build & run on BB device/simulator 3. The app launches 4. You will get an alert dialog qith a dialog 'click a button' 5. After taping on OK 0r Cancel button on the first alert dialog you will get another alert dialog with the index of the tapped button Actual Result: 1.Notice that tapping on both OK or Cancel gives us the same index i.e '0' Expected Result; 1. Both the OK & Cancel buttons should not have same index.

Comments

  1. Lokesh Choudhary 2013-05-07

    Now the alert dialog has only one button 'OK' as parity with the other platforms.
  2. Lokesh Choudhary 2013-05-07

    Verified the issue & now we have only one button 'OK' on the alert dialog as parity with other platforms. Thus we only see index '0'. Thus closing the issue. Environment: Ti Studio : 3.1.1.201305031650 Ti BB SDK : 3.2.0.v20130506213759 Mac OSX : 10.8.2 BB simulator : 10.0.10.261 Q10 Simulator : 10.1.0.1020
  3. Lokesh Choudhary 2013-05-08

    Verified on build 3.1.1.v20130507184555 & it works as expected.

JSON Source