| GitHub Issue | n/a |
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-10-17T17:12:32.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | 2013 Sprint 21, 2013 Sprint 21 API, Release 3.2.0 |
| Components | iOS |
| Labels | NavigationWindow, Popover, module_navwindow, qe-testadded, triage |
| Reporter | Thomas Neerup |
| Assignee | Vishal Duggal |
| Created | 2013-09-30T13:16:09.000+0000 |
| Updated | 2014-02-13T10:02:59.000+0000 |
With the next release NavigationGroup is removed and NavigationWindow will take over.
But the new NavigationWindow can not be added to a Popover on the iPad, this will break hundreds of applications now running with NavigationGroup's in popovers.
Steps to Reproduce
1 Create a new Alloy project
2 Paste the attached files in the newly created project
3 Run the project
Actual Result
The log states:
[INFO] Can not add a window as a child of a view. Returning
Expected Result
The NavigationWindow should be apearing inside the Popover
Can I champion this as a serious bug that will break my entire application.
I cannot believe the current feature combination dead-end is a permanent situation. This needs some sort of movement otherwise Ti SDK 3.2 will be a big problem.
Test case with Navigation Window
var win = Ti.UI.createWindow({ backgroundColor:'white' }) var btn = Ti.UI.createButton({ top:40, title:'OPEN POPOVER' }) win.add(btn); win.open(); var nav; function openWindow(win) { nav.openWindow(win); } var counter = 0; var colors = ['red','green','blue','yellow','pink']; var barcolors = ['teal','magenta','maroon','lightgray','purple']; function genWindow() { var win = Ti.UI.createWindow({ backgroundColor:'white', wincount:counter }) win.addEventListener('click',function(){ openWindow(genWindow()) }) win.addEventListener('open',function(e){ var count = e.source.wincount; if (count = count % 5); Ti.API.info('WIN OPEN '+e.source.wincount); e.source.title = 'WINDOW '+e.source.wincount; e.source.backgroundColor = colors[count]; e.source.barColor = barcolors[count]; counter ++; }) win.addEventListener('close',function(e){ Ti.API.info('WIN CLOSE '+e.source.wincount); counter --; }) win.addEventListener('focus',function(e){ Ti.API.info('WIN FOCUS '+e.source.wincount); }) win.addEventListener('blur',function(e){ Ti.API.info('WIN BLUR '+e.source.wincount); }) return win; } function genNav() { counter = 0; nav = Ti.UI.iOS.createNavigationWindow({ window:genWindow(), backgroundColor:'transparent' }) nav.addEventListener('open',function(e){ Ti.API.info('NAV OPEN'); }) nav.addEventListener('focus',function(e){ Ti.API.info('NAV FOCUS'); }) nav.addEventListener('blur',function(e){ Ti.API.info('NAV BLUR'); }) } function getPopover() { genNav(); var popover = Ti.UI.iPad.createPopover({ width:400, height:400, contentView:nav }) popover.addEventListener('hide',function(e){ nav = null; }) return popover; } btn.addEventListener('click',function(){ var popover = getPopover(); popover.show({view:btn}); })Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4784
Closing ticket as fixed. Verified fix using Vishal's above test case with: Titanium Studio, build: 3.2.0.201310181940 OS: Mac OS X Mountain Lion (10.8.5) SDK build: 3.2.0.v20131018154951 Ti CLI: 3.2.0 (72f7426b4ee6c2d2883c666d5b7e03906a16012f) Devices: ipad 3 (6.0.1), ipad 3 (7.0.2) However, was not able to verify the Alloy test case (the attachments) because of this ticket: TISTUD-5526.
Sent a pull request to fix the Alloy version of this bug: https://github.com/appcelerator/alloy/pull/292