{ "id": "61629", "key": "TIMOB-997", "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": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-04T11:23:08.000+0000", "created": "2011-04-15T02:41:09.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "core", "module_textfield", "qe-testadded", "training" ], "versions": [], "issuelinks": [], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-07T05:31:54.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}

line 116
\n(name.hasText) will crash. (name.value!='') works fine.

{html}", "attachment": [ { "id": "22590", "filename": "consoleLog.txt", "author": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-16T16:28:21.000+0000", "size": 3237, "mimeType": "text/plain" }, { "id": "22591", "filename": "crashLog.txt", "author": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-16T16:28:21.000+0000", "size": 46439, "mimeType": "text/plain" }, { "id": "17908", "filename": "setupapp.js", "author": { "name": "ryang", "key": "ryang", "displayName": "Ryan G", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:41:09.000+0000", "size": 3153, "mimeType": "application/x-javascript" } ], "flagged": false, "summary": "hasText crashes if in IF Statement", "creator": { "name": "ryang", "key": "ryang", "displayName": "Ryan G", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ryang", "key": "ryang", "displayName": "Ryan G", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124535", "author": { "name": "mofle", "key": "mofle", "displayName": "Sindre Sorhus", "active": true, "timeZone": "Europe/Oslo" }, "body": "{html}

This is still an issue in Titanium 1.5.1 and iOS 4.2.1.

{html}", "updateAuthor": { "name": "mofle", "key": "mofle", "displayName": "Sindre Sorhus", "active": true, "timeZone": "Europe/Oslo" }, "created": "2011-04-15T02:41:09.000+0000", "updated": "2011-04-15T02:41:09.000+0000" }, { "id": "162992", "author": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Bug Scrub: Valid. Test case required\r\nTested on :\r\nMac OSX Lion\r\nTiMob 1.8.0\r\nTiStud: 1.0.4.201108101535\r\n\r\nDevice:\r\niPhone Simulator", "updateAuthor": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-16T13:49:57.000+0000", "updated": "2011-08-16T13:49:57.000+0000" }, { "id": "163015", "author": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please attach console log and crash log, then reassign to me.", "updateAuthor": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-16T15:16:21.000+0000", "updated": "2011-08-16T15:16:21.000+0000" }, { "id": "163060", "author": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Console Log and Crash Log attached.", "updateAuthor": { "name": "vsingh", "key": "vsingh", "displayName": "Vikramjeet Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-16T16:28:21.000+0000", "updated": "2011-08-16T16:28:21.000+0000" }, { "id": "183810", "author": { "name": "dotnetcarpenter", "key": "dotnetcarpenter", "displayName": "Jon Ege Ronnenberg", "active": true, "timeZone": "Europe/Berlin" }, "updateAuthor": { "name": "dotnetcarpenter", "key": "dotnetcarpenter", "displayName": "Jon Ege Ronnenberg", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-02-21T09:25:07.000+0000", "updated": "2012-02-21T09:25:07.000+0000" }, { "id": "193742", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fixed in master 2.1.0.848d711", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-04T11:23:08.000+0000", "updated": "2012-05-04T11:23:08.000+0000" }, { "id": "198529", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as Fixed.\r\n\r\nVerified via modified TIDOC-461 > hasText.js attachment (modified code below).\r\n\r\nSDK: 2.1.0.v20120613210250\r\nStudio: 2.1.0.201206131907\r\nOS: Snow Leopard\r\nDevices Tested: iPhone Simulator 5.0, iPhone4 5.0.1, iPad2 4.3.5\r\n\r\nSteps to Test:\r\n\r\n1. Run code below.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({ \r\n\tbackgroundColor: '#eee', \r\n\ttitle: 'hasText bug'\r\n});\r\n\r\nvar containerView = Ti.UI.createView({\r\n\theight:30,\r\n\twidth : 100\r\n});\r\n\r\nvar textField = Ti.UI.createTextField({\r\n\theight:30,\r\n\tcolor: '#000',\r\n\tfont: {fontFamily:'Helvetica Neue', fontSize:12, fontWeight:'bold'},\r\n\tclearButtonMode: Ti.UI.INPUT_BUTTONMODE_ALWAYS,\r\n\tappearance:Ti.UI.KEYBOARD_APPEARANCE_ALERT,\r\n\treturnKeyType:Ti.UI.RETURNKEY_DONE, //DONE // NEXT // SEND\r\n\tsuppressReturn:true,\r\n\tborderStyle:Ti.UI.INPUT_BORDERSTYLE_ROUNDED,\r\n\twidth : 70\r\n});\r\n\r\ntextField.addEventListener('change', function(e) {\r\n\ttry {\r\n\t\tif(textField.hasText()) {\r\n\t\t\tTi.API.log(\"No bug!\");\r\n\t\t}\r\n\t}\r\n\tcatch(e) {\r\n\t\tTi.API.warn(e.message);\r\n\t}\r\n});\r\n\r\n// hide the keyboard when a user click out-side the field\r\nwin.addEventListener('click', function() {\r\n\ttextField.blur();\r\n})\r\n\r\ncontainerView.add(textField);\r\n\r\nwin.add(containerView);\r\n\r\nwin.open();\r\n{code}\r\n\r\n2. Select the text field and type a few characters.\r\n\r\nExpected Result:\r\n\r\nNo crash. 'No Bug!' logs to console for every character typed.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-14T12:37:42.000+0000", "updated": "2012-06-14T12:37:42.000+0000" }, { "id": "278590", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4863\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-07T05:31:54.000+0000", "updated": "2013-11-07T05:31:54.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }