[TIMOB-4689] iOS:globalPoint property is undefined in a tableview click event
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2011-08-01T12:33:40.000+0000 |
Affected Version/s | Release 1.7.0 |
Fix Version/s | Sprint 2011-31 |
Components | iOS |
Labels | n/a |
Reporter | Anirudh Nagesh |
Assignee | Blain Hamon |
Created | 2011-07-14T18:12:20.000+0000 |
Updated | 2017-03-03T22:30:04.000+0000 |
Description
The globalpoint property in a click event on a tableview is undefined. It does not return the screen co-ordinates.
Step1: Copy the below code in app.js
Titanium.UI.setBackgroundColor('white');
var win = Titanium.UI.createWindow();
var data = [{title:"Row 1"},{title:"Row 2"}];
var table = Titanium.UI.createTableView({data:data,backgroundColor:'#336699'});
table.addEventListener('click',function(e)
{
Ti.API.info('globalpoint dictionary is...' +e.globalPoint);
Ti.API.info('X co-ordinate is'+e.x);
Ti.API.info('Y co-ordinate is'+e.y);
}
);
win.add(table);
win.open();
Step2: The globalPoint property is undefined
Workaround: to obtain the screen co-ordinates using e.x and e.y
TIMOB-4475 already caused globalpoint to be added to tableview. Verified that we're getting x and y locations in the sample code.
Closing as duplicate.