{ "id": "120777", "key": "TIMOB-15428", "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": "15935", "description": "2014 Sprint 06", "name": "2014 Sprint 06", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15936", "description": "2014 Sprint 06 SDK", "name": "2014 Sprint 06 SDK", "archived": true, "released": true, "releaseDate": "2014-03-28" }, { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-03-17T20:19:07.000+0000", "created": "2013-10-03T18:50:48.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ios6", "ios7", "ipad", "module_popover", "popover", "qe-closed-3.2.3", "qe-testadded", "tableViewRow" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2014-07-28T17:17:21.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": "Trying to display a popover from a tableViewRow fails with the following message in the console\r\n \"Unable to display popover; view is not attached to the current window\"\r\n\r\nTEST CASE:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar section = Ti.UI.createTableViewSection();\r\n\r\nfor (var i=1; i < 5; i++) {\r\n\tsection.add(Ti.UI.createTableViewRow({\r\n\t\ttitle:'Row '+i\r\n\t}));\r\n}\r\n\r\nvar table = Ti.UI.createTableView({\r\n \r\n data:[section]\r\n});\r\n\r\ntable.addEventListener('click', function(e){\r\n\t\r\n\tTi.API.info('You clicked row '+e.index);\r\n\tTi.API.info('source '+e.source);\r\n\t\r\n\tTi.API.info(JSON.stringify(e.row));\r\n\t\r\n\t\r\n\tvar popover = Ti.UI.iPad.createPopover({\r\n \t \twidth: 250,\r\n \theight: 100,\r\n \ttitle: 'a POpover',\r\n \r\n\t});\r\n\t\r\n\t\r\n\t//popover.show({view:e.source});\r\n\tpopover.show({view:e.row});\r\n\t\r\n});\r\n\r\n\r\nwin.add(table);\r\n\r\n\r\nvar splitwin = Ti.UI.iPad.createSplitWindow({\r\n detailView: Ti.UI.createWindow({backgroundColor:'red'}),\r\n masterView: win,\r\n \r\n orientationModes :[Ti.UI.LANDSCAPE_LEFT],\r\n});\r\n\r\n\r\nsplitwin.open();\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "IOS: iPad Popover can't be associated to a TableViewRow", "creator": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "subtasks": [], "reporter": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "environment": "Ti SDK 3.1.4\r\nXcode 5\r\nMacOS 10.8.4", "comment": { "comments": [ { "id": "273842", "author": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "body": "check in TiUIiPadPopOver.m -(void)updatePopoverNow\r\n\r\nin this case we are receiving a TiUITableViewRowProxy and the view property is nil for this kind of proxy.\r\n\r\nquick and dirty fix : search for the UItableViewCell contentView inside the TableViewRowProxy.\r\n\r\nSo, to get the view in case of a TiUITableViewRowProxy I added in -(void)updatePopoverNow around line 289\r\n\r\n{code}\r\n....\r\n\r\nUIView *view_ = [popoverView view];\r\n\r\n// special case for tableViewRowProxy\r\n\r\nif ([popoverView isKindOfClass:[TiUITableViewRowProxy class]]) {\r\n \r\n TiUITableViewRowProxy* proxy = (TiUITableViewRowProxy*) popoverView;\r\n \r\n \r\n view_= [proxy.callbackCell contentView];\r\n \r\n \r\n }\r\n\r\n// end special case for tableViewRowProxy\r\n\r\n\r\nif ([view_ window] == nil) {\r\n\t\t\t// No window, so we can't display the popover...\r\n\t\t\tDebugLog(@\"[WARN] Unable to display popover; view is not attached to the current window\");\r\n return;\r\n\t\t}\r\n....\r\n{code}", "updateAuthor": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "created": "2013-10-04T20:06:01.000+0000", "updated": "2013-10-04T20:18:18.000+0000" }, { "id": "285842", "author": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "body": "\r\nI can't believe this problem exist for 4 years now ..\r\n\r\nhttp://developer.appcelerator.com/question/25961/possible-to-use-popoveroptiondialog-with-table-row-in-ipad", "updateAuthor": { "name": "vince", "key": "vince", "displayName": "Vincent ", "active": true, "timeZone": "Europe/Paris" }, "created": "2013-12-26T09:48:50.000+0000", "updated": "2013-12-26T09:48:50.000+0000" }, { "id": "285856", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We currently have this scheduled to be fixed in 3.2.1.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-26T16:12:22.000+0000", "updated": "2013-12-26T16:12:22.000+0000" }, { "id": "297279", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pulls pending\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/5468\r\n3_2_X - https://github.com/appcelerator/titanium_mobile/pull/5469", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-14T17:59:11.000+0000", "updated": "2014-03-14T17:59:11.000+0000" }, { "id": "297784", "author": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and verified the fix with:\r\nAppcelerator Studio, build: 3.2.3.201403171239\r\nTitanium SDK, build: 3.2.3.v20140317142455\r\nNode.JS Version: v0.10.13\r\nNPM Version: 1.3.2\r\n├── acs@1.0.14\r\n├── alloy@1.3.1\r\n├── npm@1.3.2\r\n├── titanium@3.2.1\r\n└── titanium-code-processor@1.1.0\r\nDevice:iPad iOS 7.0.3\r\nPopover can be associated to a TableViewRow.", "updateAuthor": { "name": "oromero", "key": "oromero", "displayName": "Olga Romero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-18T22:55:45.000+0000", "updated": "2014-03-18T22:56:09.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }