[TIMOB-14631] BlackBerry: Not able to get e.source on click event for UI controls such as window, view, button etc
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-08-01T23:02:27.000+0000 |
Affected Version/s | Release 3.1.2 |
Fix Version/s | 2013 Sprint 16, 2013 Sprint 16 API, Release 3.2.0 |
Components | BlackBerry |
Labels | qe-3.1.2, qe-testadded |
Reporter | Priya Agarwal |
Assignee | Pedro Enrique |
Created | 2013-07-23T12:08:29.000+0000 |
Updated | 2014-02-20T00:49:58.000+0000 |
Description
Not getting e.source on click event for UI controls.
Checked with view,button and window.
This is not a regression.
Steps to reproduce:
1) Make a test Project and replace app.js with the code given below.
2) Launch the app.
3) After the app gets launched. Click the button.
var win = Ti.UI.createWindow({backgroundColor:'white'});
var btn = Ti.UI.createButton({
title: 'click me',
height: 50,
width: 150,
color:'black'
});
btn.addEventListener('click',function(e){
alert(JSON.stringify(e.source));
});
win.add(btn);
win.open();
Actual Result: Do not get anything it just returns empty JSON as"{}"
Expected Result:It must return button properties as in ios and android.
First pass:
does in fact return the JS obect called, i.e. Button, Window, etc. But the log outputs nothing.
Conclusion: When setting a TiProxy to TiProxy property, in this case the message on the alert, it would get ignored. if the property is not a proxy, then it would work. Fixed by rewriting the way we set properties on init. PR: https://github.com/appcelerator/titanium_mobile_blackberry/pull/142
Getting e.source on click event for UI controls such as window, view, button etc. Checked for view and button. Hence Closing the issue. Tested Environment: Appcelerator Studio: 3.2.0.201311120707 SDK:3.2.0.v20131111174605 alloy: 1.3.0 acs: 1.0.7 npm: 1.3.2 titanium: 3.2.0 titanium-code-processor: 1.0.3 Xcode:5.0.1 Device: Blackeberry Z 10 OS: Mac OSX 10.9