{ "id": "62831", "key": "TIMOB-2199", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2012-07-26T11:30:51.000+0000", "created": "2011-04-15T03:13:18.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "19345", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "94532", "key": "TIMOB-9901", "fields": { "summary": "TiAPI: Review and clean up platform bugs and reduce bug count by 20%.", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-07-26T21:44:50.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Titanium Developer (v1.2.1) - SDK version: 1.4.1.1

\n

The Event object on the Button click event does not appear to\ncontain much information on the iPhone. It appears to work\ncorrectly on the Android side.

\n

Appears to be similar to \nhttps://developer.appcelerator.com/question/8431/click-event-on-an-...

\n

~~~ var btn1 =\nTitanium.UI.createButton({image:'images/1.png',left:5,top:200,width:48,height:48,canScale:true});
\nbtn1.addEventListener('click',function(e) {
\ntxtInput.value+=\"1\";
\nTitanium.API.debug(\"globalPoint:[\" + e.globalPoint + \"]\");
\nTitanium.API.debug(\"source:[\" + e.source + \"]\");
\nTitanium.API.debug(\"type:[\" + e.type + \"]\");
\nTitanium.API.debug(\"x:[\" + e.x + \"]\");
\nTitanium.API.debug(\"y:[\" + e.y + \"]\");
\n});

\n

win1.add(btn1);
\n~~~

\n

OUTPUT SHOWS:

\n

iPhone
\n~~~ [DEBUG] globalPoint:[undefined] [DEBUG] source:[[object TiUIButton]]\n[DEBUG] type:[click] [DEBUG] x:[undefined] [DEBUG] y:[undefined] ~~~

\n

Android
\n~~~ [DEBUG] [69,12017] globalPoint:[undefined]\n[DEBUG] [11,12028]\nsource:[ti.modules.titanium.ui.ButtonProxy@44fd77c0] [DEBUG] [1,12029] type:[click] [DEBUG] [8,12037] x:[13] [DEBUG] [11,12048] y:[11.66668701171875]\n~~~

\n

Also, when I try to access globalPoint.x (maybe I don't know how\nto access it correctly) but it gets an access violation. It seems\nto me that it is not getting populated/created on either\ndevice.

{html}", "attachment": [], "flagged": false, "summary": "Button Click Event Object Missing X & Y coords on iPhone", "creator": { "name": "steveday", "key": "steveday", "displayName": "Steve Day", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "steveday", "key": "steveday", "displayName": "Steve Day", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127789", "author": { "name": "steveday", "key": "steveday", "displayName": "Steve Day", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I forgot to add the version info.

\n

Titanium Developer (v1.2.1)

\n

[INFO] Titanium SDK version: 1.4.1.1

{html}", "updateAuthor": { "name": "steveday", "key": "steveday", "displayName": "Steve Day", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:13:18.000+0000", "updated": "2011-04-15T03:13:18.000+0000" }, { "id": "209645", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cannot reproduce in SDK 2.2.0.014b86f on iPhone Sim 5.1.\r\n\r\nTest:\r\n{code}\r\nvar win1 =Ti.UI.createWindow();\r\nvar btn1 = Titanium.UI.createButton({image:'images/chat.png',left:5,top:200,width:48,height:48,canScale:true});\r\nbtn1.addEventListener('click',function(e) {\r\nTitanium.API.debug(\"globalPoint:[\" + e.globalPoint + \"]\");\r\nTitanium.API.debug(\"source:[\" + e.source + \"]\");\r\nTitanium.API.debug(\"type:[\" + e.type + \"]\");\r\nTitanium.API.debug(\"x:[\" + e.x + \"]\");\r\nTitanium.API.debug(\"y:[\" + e.y + \"]\");\r\n});\r\n\r\nwin1.add(btn1);\r\nwin1.open();\r\n{code}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-26T11:30:51.000+0000", "updated": "2012-07-26T11:30:51.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }