{ "id": "164680", "key": "TIMOB-24175", "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": "18246", "name": "Hyperloop 2.0.1", "archived": false, "released": true, "releaseDate": "2017-03-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-12-01T18:50:30.000+0000", "created": "2016-11-25T06:46:59.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "Hyperloop", "android", "qe-hyperloop" ], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-01-26T18:23:37.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": "10202", "name": "Android", "description": "Android Platform" }, { "id": "13715", "name": "Hyperloop", "description": "Hyperloop project" } ], "description": "I'm currently implementing a Hyperloop lib that uses the native EditText widget. \r\nThe EditText widget holds its value in an instance of the *Editable* class. When you want to get this value, all you have to do is:\r\n\r\n{code:java}\r\nyourEditText.getText(); // an implicit call to toString() is done here when you try to log this value\r\n{code}\r\n\r\nThe problem that I'm facing is that the *Editable* implementation of *toString()* is not accessible with Hyperloop.\r\n\r\n\r\n*Example:*\r\nCreate a Hyperloop enabled project and require the *android.text.Editable* class in any controller:\r\n\r\n{code:java}\r\nvar Editable = require('android.text.Editable');\r\n{code}\r\n\r\nBuild and run the project. Go to the */build/hyperloop/android/js* folder and look for the *android.text.Editable* file. You'll notice that the generated *toString()* method is not calling the native *toString()* function like this:\r\n\r\n{code:java}\r\n...\r\nthis.$native.callNativeFunction({ /* something here */ }) \r\n...\r\n{code}\r\n\r\nInstead, this is what's being generated:\r\n\r\n{code:java}\r\nEditable.toString = function() {\r\n\treturn \"[object \" + this.className + \"]\";\r\n};\r\n{code}\r\n\r\nThis basically blocks you from using any widget/component that stores its data in an *Editable* instance, since the value of *toString()* will always be *[object android.text.Editable]*\r\n ", "attachment": [], "flagged": false, "summary": "Hyperloop: Android - Can't get value from \"Editable\" class because toString method is overridden ", "creator": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "subtasks": [], "reporter": { "name": "rdperottoni", "key": "rdperottoni", "displayName": "Rodolfo Perottoni", "active": true, "timeZone": "Australia/Brisbane" }, "environment": "Hyperloop 2.0.0\r\nSDK 6.0.0.GA", "closedSprints": [ { "id": 758, "state": "closed", "name": "2016 Sprint 24 SDK", "startDate": "2016-11-19T01:32:06.991Z", "endDate": "2016-12-03T01:32:00.000Z", "completeDate": "2016-12-05T01:53:38.311Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "402419", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/hyperloop.next/pull/106\r\n2_0_X: https://github.com/appcelerator/hyperloop.next/pull/107", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-01T17:57:26.000+0000", "updated": "2016-12-01T18:10:15.000+0000" }, { "id": "405409", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, Values from an {{editable}} class are now accessible.\r\n\r\nTested on:\r\n\r\n{noformat}\r\nmacOS Sierra 10.12.2\r\nNexus 5X (6.0.1)\r\nPixel Xl (7.1.1)\r\nandroid emulator (4.4.2, 6.0)\r\nTi SDK: 6.1.0.v20170126073441\r\nHyperloop: 2.0.1\r\nAppc CLI: 6.1.0\r\nAppc NPM: 4.2.8\r\nNode v4.6.0\r\n{noformat}\r\n\r\n*Closing Ticket.*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2017-01-26T18:23:20.000+0000", "updated": "2017-01-26T18:23:20.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }