{ "id": "81429", "key": "TIMOB-5744", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2020-02-14T09:15:57.000+0000", "created": "2011-10-12T05:04:33.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [], "versions": [ { "id": "11971", "description": "iOS5 and select Android fixes", "name": "Release 1.7.3", "archived": true, "released": true, "releaseDate": "2011-10-18" } ], "issuelinks": [ { "id": "25429", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "109043", "key": "TIMOB-12553", "fields": { "summary": "TiAPI: Implement \"apiName\" property on proxies", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2020-02-14T09:15:57.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" } ], "description": "As noticed in this thread:\r\n\r\nhttp://developer.appcelerator.com/question/126708/respond-to-a-button-in-a-table-row-without-triggering-table-row-click\r\n\r\nTitanium component's \"toString\" method does not provide identical string on different platforms.\r\n\r\n\r\nFor example:\r\n\r\n{code}\r\nvar button = Ti.UI.createButton();\r\nTi.API.debug(button.toString());\r\n{code}\r\n\r\non Android it produces: [Ti.UI.Button]\r\nwhile on iOS it produces: [object TiUIButton]\r\n\r\n\r\nIMHO, it would be nice if \"toString\" method would be standardized for all Titanium components, \"[object TiComponentName]\" seems OK choice to me.", "attachment": [], "flagged": false, "summary": "Android: Titanium objects' toString method is not consistent", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Titanium SDK version: 1.7.3 (10/07/11 13:30 fa408d4...), Android 2.2 (Samsung Galaxy Tab v7), Windows XP", "comment": { "comments": [ { "id": "169132", "author": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Same results in SDK 1.7.2", "updateAuthor": { "name": "mapperson", "key": "mapperson", "displayName": "Matthew Apperson", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-13T08:36:17.000+0000", "updated": "2011-10-13T08:36:17.000+0000" }, { "id": "176685", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "This seems to be fixed in 1.8.0.1 SDK, I haven't verified on iOS, but \"v8\" got this right, also \"JSON.stringify\" now works as it should.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2011-12-20T03:28:59.000+0000", "updated": "2011-12-20T03:28:59.000+0000" }, { "id": "176976", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Reporter has indicated that this is fixed. Just needs to be tested on both platforms.", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2011-12-21T18:43:45.000+0000", "updated": "2011-12-21T18:43:45.000+0000" }, { "id": "180034", "author": { "name": "karl.astrom", "key": "karl.astrom", "displayName": "Karl Åström", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Actually now toString returns [object View] on v8 and [object TiUIView] on ios so it's not consistent. I would express a preference for the iOS version since it makes it possible to construct a general matcher for Ti-components as noted above. \r\n\r\nIf i could make a really bold request I'd like for titanium to implement its components so that Object.prototype.toString returns good values on iOS as specified in ecma-262 5th ed section 15.2.4.2\r\nCurrently it returns [object Object] for all Ti-components on iOS which is less useful.", "updateAuthor": { "name": "karl.astrom", "key": "karl.astrom", "displayName": "Karl Åström", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-20T10:29:42.000+0000", "updated": "2012-01-20T10:29:42.000+0000" }, { "id": "180143", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Yeah Karl, you're right, I missed to notice that and I agree \"[object TiUIView]\" is good naming convention.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-01-23T01:52:28.000+0000", "updated": "2012-01-23T01:52:28.000+0000" }, { "id": "182201", "author": { "name": "karl.astrom", "key": "karl.astrom", "displayName": "Karl Åström", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Also, as i found out while hunting a particularly annoying bug today, if you have an id property in your view you get neither of these but instead something based on the id like so: Ti.UI.createView({id:'fooBar'}).toString() == '[object fooBar]' ", "updateAuthor": { "name": "karl.astrom", "key": "karl.astrom", "displayName": "Karl Åström", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-07T07:45:10.000+0000", "updated": "2012-02-07T07:45:10.000+0000" }, { "id": "236930", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We may want to discuss if overriding toString() is a good practice.\nIt may be better to introduce a property on proxies for getting the type name.\n\nEx: var view = Ti.UI.createView(); view.name === 'Ti.UI.View';", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-01T19:42:31.000+0000", "updated": "2013-02-01T19:42:31.000+0000" }, { "id": "236931", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-01T19:45:43.000+0000", "updated": "2013-02-01T19:45:43.000+0000" }, { "id": "454279", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "we have {{apiName}} property for this.", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-02-14T09:15:57.000+0000", "updated": "2020-02-14T09:15:57.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }