{ "id": "83221", "key": "TIMOB-6374", "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": "12094", "description": "", "name": "Sprint 2012-02", "archived": true, "released": true, "releaseDate": "2012-01-29" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-02-10T00:24:22.000+0000", "created": "2011-11-30T08:12:05.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "issuelinks": [ { "id": "14012", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "83220", "key": "MOD-312", "fields": { "summary": "iOS: Example Properties Are Broken", "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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-03-04T22:12:47.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": "h1. Problem\r\nThe setter example property in the default module template is written incorrectly, so it ends up hiding the getter.\r\n\r\nh2. Test app.js\r\nRun the following with the module for the conclusions to follow:\r\n{code:title=app.js}\r\nvar test = require('ti.test');\r\nvar win = Titanium.UI.createWindow({\r\n\tbackgroundColor:'white'\r\n});\r\nwin.add(Titanium.UI.createLabel({\r\n\ttext: test.exampleProp\r\n}));\r\ntest.exampleProp = 'Goodbyte, module!';\r\nwin.open();\r\n{code}\r\n\r\nh2. Why It Doesn't Work\r\nThe setter doesn't follow conventions, so it hides the getter:\r\n\r\n{code:title=BadModule.m}\r\n-(id)exampleProp\r\n{\r\n\tNSLog(@\"exampleProp called!\");\r\n\treturn @\"Hello, world!\";\r\n}\r\n\r\n-(void)exampleProp:(id)value\r\n{\r\n\tNSLog(@\"setExampleProp called!\");\r\n}\r\n{code}\r\n\r\nThe label will display \"[object ti.test]\" (or whatever the ID of your module is), not the expected \"Hello, world!\".\r\n\r\nh2. How to Fix\r\nThe setter should be prefixed with \"set\", as in the following:\r\n{code:title=Good.m}\r\n-(void)setExampleProp:(id)value\r\n{\r\n\tNSLog(@\"setExampleProp called!\");\r\n}\r\n{code}\r\n\r\nWith that in hand, everything works as expected.\r\n\r\nh2. Pull Request\r\nhttps://github.com/appcelerator/titanium_mobile/pull/788", "attachment": [], "flagged": false, "summary": "iOS: Module Template's Setter Property is Incorrect", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "174297", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "Pull request sent, annotated in description.", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-11-30T08:19:45.000+0000", "updated": "2011-11-30T08:19:45.000+0000" }, { "id": "180178", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nSDK build: 1.9.0.v20120121223134\r\nTitanium Studio, build: 1.0.8.201201210622\r\nXcode: 4.2\r\nOS: Mac OS X Lion (10.7.2)\r\nDevice: iPhone 4S Verizon (5.0.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-01-23T10:47:11.000+0000", "updated": "2012-01-23T10:47:11.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }