{ "id": "134235", "key": "TIMOB-17551", "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": null, "resolutiondate": null, "created": "2014-08-06T15:53:05.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "TCSupport", "number", "reprod", "textfield" ], "versions": [ { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:02.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4. Problem Description\r\nAccording to the documentation returned TextField value should be always String. The problem is that sometimes it may return a Number. See the example below:\r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project (classic Titanium)\r\n2. Paste this code into app.js:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\nvar tf = Ti.UI.createTextField({\r\n\twidth: 230, height: 40,\r\n\tbackgroundColor: \"red\"\r\n});\r\n\r\ntf.value = 10; // Shouldn't be this value converted to a string?\r\n\r\nconsole.log(typeof tf.value); // number\r\n\r\nsetTimeout(function() {\r\n\tconsole.log(typeof tf.value); // string?\r\n}, 1000);\r\n\r\n\r\nwin.add(tf);\r\nwin.open();\r\n{code}\r\n3. The textfield sometimes returns a number instead of a string. \r\n", "attachment": [], "flagged": false, "summary": "iOS: TextField return a Number instead of String", "creator": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "3.3.0 (iOS Simulator)", "comment": { "comments": [ { "id": "320514", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces on SDK Version 3.3.0 and 3.4.0\r\n\r\nTitanium Command-Line Interface, \r\nCLI version 3.3.0, \r\nTitanium SDK version 3.3.0.GA \r\nTitanium SDK version 3.4.0.GA \r\nAppcelerator Studio, build: 3.3.0.201407111535 \r\niOS SDK: 7.1\r\niOS iPhone Simulator: 7.1", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-27T05:03:04.000+0000", "updated": "2014-08-27T05:03:04.000+0000" }, { "id": "422279", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue with the following environment;\r\niPhone 7 (10.2)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1.v20170609091155\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.1\r\nTi CLI 5.0.13\r\nAlloy 1.9.11\r\nArrow 2.0.0\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-19T20:20:04.000+0000", "updated": "2017-06-19T20:20:04.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }