{
"id": "172715",
"key": "TIMOB-26639",
"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": "19882",
"name": "Release 8.0.0",
"archived": false,
"released": true,
"releaseDate": "2019-03-14"
}
],
"resolution": {
"id": "1",
"description": "A fix for this issue is checked into the tree and tested.",
"name": "Fixed"
},
"resolutiondate": "2018-12-19T12:08:00.000+0000",
"created": "2018-12-07T12:45:35.000+0000",
"priority": {
"name": "Critical",
"id": "1"
},
"labels": [
"7.5.0.GA",
"ios",
"textfield"
],
"versions": [],
"issuelinks": [],
"assignee": {
"name": "vijaysingh",
"key": "vijaysingh",
"displayName": "Vijay Singh",
"active": true,
"timeZone": "America/Los_Angeles"
},
"updated": "2018-12-19T16:07:26.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": "Please check the following example.\r\n\r\n{code:java}\r\ntrue\r\ntrue\r\n{code}\r\n\r\n{code:java}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar textFieldA = Titanium.UI.createTextField({\r\n\theight:'35dip',\r\n\twidth:'100dip',\r\n\ttop:'60dip',\r\n \thintText:L('To'),\r\n \tvalue:0,\r\n\tfont:{fontSize:'18sp', fontWeight:'normal', fontFamily:'Tahoma'},\r\n\tcolor:'#808080'\r\n});\r\n\r\nwin.add(textFieldA);\r\n\r\nvar textFieldB = Titanium.UI.createTextField({\r\n\theight:'35dip',\r\n\twidth:'100dip',\r\n\ttop:'120dip',\r\n \thintText:L('To'),\r\n \tvalue:0,\r\n\tfont:{fontSize:'18sp', fontWeight:'normal', fontFamily:'Tahoma'},\r\n\tcolor:'#808080'\r\n});\r\n\r\nwin.add(textFieldB);\r\n\r\ntextFieldA.addEventListener('change', function() {\r\n\tTi.API.info(textFieldA.hasText());\r\n\tTi.API.info(textFieldB.hasText());\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\n\r\n{code:java}\r\n[ERROR] : Script Error {\r\n[ERROR] : column = 32;\r\n[ERROR] : line = 31;\r\n[ERROR] : message = \"-[__NSCFNumber length]: unrecognized selector sent to instance 0xf1166b2877fc7f68\";\r\n[ERROR] : nativeStack = \"3 CoreFoundation 0x0000000114a37ed6 ___forwarding___ + 1446\\n4 CoreFoundation 0x0000000114a39da8 _CF_forwarding_prep_0 + 120\\n5 Random0x000000010c6122df -[TiUITextWidgetProxy hasText:] + 367\\n6 CoreFoundation 0x0000000114a3a03c __invoking___ + 140\\n7 CoreFoundation 0x0000000114a374d5 -[NSInvocation invoke] + 325\\n8 Random0x000000010c62c642 -[KrollMethod call:] + 2114\\n9 Random0x000000010c62aeb2 __KrollCallAsFunction_block_invoke + 50\\n10 Random0x000000010c73ff8e TiThreadPerformOnMainThread + 78\\n11 Random0x000000010c62ab60 KrollCallAsFunction + 704\\n12 JavaScriptCore 0x000000010d30d5b3 _ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE4callEPNS_9ExecStateE + 515\\n13 JavaScriptCore 0x000000010d89b571 _ZN3JSC5LLInt9setUpCallEPNS_9ExecStateEPNS_11InstructionENS_22CodeSpecializationKindENS_7JSValueEPNS_17LLIntCallLinkInfoE + 385\\n14 JavaScriptCore 0x000000010d2da32f llint_entry + 26803\\n15 JavaScriptCore 0x000000010d2d38fe vmEntryToJavaScript + 244\\n16 JavaScriptCore 0x000000010d7cf846 _ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 470\\n17 JavaScriptCore 0x000000010d9d09b4 _ZN3JSC12profiledCallEPNS_9ExecStateENS_15ProfilingReasonENS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE + 196\\n18 JavaScriptCore 0x000000010d3132d4 JSObjectCallAsFunction + 468\\n19 Random0x000000010c894946 __TiBindingEventProcess_block_invoke + 86\";\r\n[ERROR] : sourceURL = \"file:///Users//Library/Developer/CoreSimulator/Devices/7F806F4D-BC9D-468C-B3C3-1D218543724D/data/Containers/Bundle/Application/9AB9A6C9-927A-45DA-829D-475EF3474B44/Random.app/app.js\";\r\n[ERROR] : stack = \" at [native code]\\n at (/app.js:31:32)\\n at [native code]\\n at (/app.js:34:9)\\n at global code(/app.js:36:70)\\n at require@[native code]\\n at (/ti.main.js:27:10)\\n at loadAsync(/ti.internal/bootstrap.loader.js:106:11)\\n at global code(/ti.main.js:24:52)\";\r\n[ERROR] : toJSON = \"\";\r\n[ERROR] : }\r\n{code}\r\n",
"attachment": [],
"flagged": false,
"summary": "iOS: hasText() does not work",
"creator": {
"name": "andreas.pingas",
"key": "andreas.pingas",
"displayName": "Andreas Pingas",
"active": true,
"timeZone": "America/Los_Angeles"
},
"subtasks": [],
"reporter": {
"name": "andreas.pingas",
"key": "andreas.pingas",
"displayName": "Andreas Pingas",
"active": true,
"timeZone": "America/Los_Angeles"
},
"environment": null,
"comment": {
"comments": [
{
"id": "444371",
"author": {
"name": "rmitro",
"key": "rmitro",
"displayName": "Rakhi Mitro",
"active": false,
"timeZone": "America/Los_Angeles"
},
"body": "Hello,\r\n\r\nThanks for reporting this. Are you experiencing this on simulator or device?",
"updateAuthor": {
"name": "rmitro",
"key": "rmitro",
"displayName": "Rakhi Mitro",
"active": false,
"timeZone": "America/Los_Angeles"
},
"created": "2018-12-10T04:16:39.000+0000",
"updated": "2018-12-10T04:16:39.000+0000"
},
{
"id": "444377",
"author": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"body": "You are using a non-string value in your text-field, leading to a crash in [this line|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUITextWidgetProxy.m#L67] where it checks against nil (which it isn't) and then tries to get it's length, which is only possible for string-based values. Workarounds: Either pass a valid string (force either via ES6 templates or {{new String(value)}}) or change the core to handle numbers as well. I'd propose the 1st option.",
"updateAuthor": {
"name": "hknoechel",
"key": "hansknoechel",
"displayName": "Hans Knöchel",
"active": true,
"timeZone": "Europe/Berlin"
},
"created": "2018-12-10T06:42:36.000+0000",
"updated": "2018-12-10T06:42:36.000+0000"
},
{
"id": "444392",
"author": {
"name": "vijaysingh",
"key": "vijaysingh",
"displayName": "Vijay Singh",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "[~andreas.pingas] \r\n You can use workaround as suggested by [~hknoechel].\r\n [~hknoechel] We are converting argument passed to 'value' property to string [here|https://github.com/appcelerator/titanium_mobile/blob/81a27b0af4c38f10dc6e55d5960b38435b395a63/iphone/Classes/TiUITextWidget.m#L51]. So I would like to make similar changes [here|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUITextWidgetProxy.m#L67] as well to convert value to string .",
"updateAuthor": {
"name": "vijaysingh",
"key": "vijaysingh",
"displayName": "Vijay Singh",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-12-10T09:39:40.000+0000",
"updated": "2018-12-10T09:57:52.000+0000"
},
{
"id": "444393",
"author": {
"name": "vijaysingh",
"key": "vijaysingh",
"displayName": "Vijay Singh",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "PR - https://github.com/appcelerator/titanium_mobile/pull/10521",
"updateAuthor": {
"name": "vijaysingh",
"key": "vijaysingh",
"displayName": "Vijay Singh",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-12-10T09:56:09.000+0000",
"updated": "2018-12-10T09:56:09.000+0000"
},
{
"id": "444621",
"author": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "FR Passed.\r\nWaiting for merge to be enabled.",
"updateAuthor": {
"name": "lchoudhary",
"key": "lchoudhary",
"displayName": "Lokesh Choudhary",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-12-15T00:21:48.000+0000",
"updated": "2018-12-15T00:21:48.000+0000"
},
{
"id": "444742",
"author": {
"name": "smohammed",
"key": "smohammed",
"displayName": "Samir Mohammed",
"active": true,
"timeZone": "America/Los_Angeles"
},
"body": "Closing ticket, fix verified in SDK Version 8.0.0.v20181219044040\r\n\r\nTest and other information can be found at: \r\nhttps://github.com/appcelerator/titanium_mobile/pull/10521",
"updateAuthor": {
"name": "smohammed",
"key": "smohammed",
"displayName": "Samir Mohammed",
"active": true,
"timeZone": "America/Los_Angeles"
},
"created": "2018-12-19T16:07:18.000+0000",
"updated": "2018-12-19T16:07:18.000+0000"
}
],
"maxResults": 6,
"total": 6,
"startAt": 0
}
}
}