{ "id": "108932", "key": "TIMOB-12511", "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": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" }, { "id": "15095", "description": "2013 Sprint 03 BB", "name": "2013 Sprint 03 BB", "archived": true, "released": true, "releaseDate": "2013-02-11" }, { "id": "14813", "description": "2013 Sprint 03", "name": "2013 Sprint 03", "archived": true, "released": true, "releaseDate": "2013-02-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-02-01T18:17:12.000+0000", "created": "2013-01-31T06:55:43.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "25361", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "outwardIssue": { "id": "108418", "key": "TIMOB-12391", "fields": { "summary": "BlackBerry: Unable to build KitchenSink sample app in Studio", "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 } } } }, { "id": "25404", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "97425", "key": "TIMOB-9980", "fields": { "summary": "Blackberry: Support custom defined events on Proxy objects", "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": "Low", "id": "4" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-04-01T21:58:07.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": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "Developers should be able to add and fire events on module objects (ex: API, App).\r\n\r\nh3. Acceptance Test\r\n{code:javascript}\r\nfunction listener() {\r\n\tTi.API.info('Event from ' + this.module);\r\n}\r\n\r\nfunction testEvent(module, name) {\r\n module.addEventListener('foo', listener.bind({module:name}));\r\n module.fireEvent('foo');\r\n}\r\n\r\ntestEvent(Ti, 'Ti');\r\ntestEvent(Ti.API, 'API');\r\ntestEvent(Ti.App, 'App');\r\ntestEvent(Ti.Codec, 'Codec');\r\ntestEvent(Ti.Database, 'Database');\r\ntestEvent(Ti.Network, 'Network');\r\ntestEvent(Ti.Platform, 'Platform');\r\ntestEvent(Ti.UI, 'UI');\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle: 'Click, me!',\r\n\twidth: 300, height: 300\r\n});\r\nwin.add(button);\r\n\r\nbutton.addEventListener('click', function() {\r\n\tTi.API.info('click!');\r\n});\r\n\r\nbutton.addEventListener('foo', function() {\r\n\tTi.API.info('foo!');\r\n});\r\nbutton.fireEvent('foo');\r\n\r\nwin.open();\r\n{code}\r\n\r\n1. Run the test case.\r\n2. You should see events fire and log the module from which they\r\n came from in the logs.\r\n3. You should also see a 'foo' event logged which was fired from the button.\r\n4. Try clicking the button and you will see \"click!\" printed to confirm native events still work.", "attachment": [], "flagged": false, "summary": "BlackBerry: All modules should support event listeners.", "creator": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "236877", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created pull request [#18|https://github.com/appcelerator/titanium_mobile_blackberry/pull/18] to resolve issue.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-01T06:07:44.000+0000", "updated": "2013-02-01T06:07:44.000+0000" }, { "id": "237517", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-06T21:44:26.000+0000", "updated": "2013-02-06T21:44:26.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }