Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15402] iOS: Unable to add NavigationWindow to Popover

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-10-17T17:12:32.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 21, 2013 Sprint 21 API, Release 3.2.0
ComponentsiOS
LabelsNavigationWindow, Popover, module_navwindow, qe-testadded, triage
ReporterThomas Neerup
AssigneeVishal Duggal
Created2013-09-30T13:16:09.000+0000
Updated2014-02-13T10:02:59.000+0000

Description

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

Attachments

FileDateSize
index.js2013-09-30T13:16:12.000+0000141
index.xml2013-09-30T13:16:11.000+0000193
popover.xml2013-09-30T13:16:11.000+0000172

Comments

  1. Mark Henderson 2013-10-04

    Can I champion this as a serious bug that will break my entire application.
  2. Malcolm Hollingsworth 2013-10-06

    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.
  3. Vishal Duggal 2013-10-14

    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});
       })
       
  4. Vishal Duggal 2013-10-14

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4784
  5. Wilson Luu 2013-10-21

    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.
  6. Paul Mietz Egli 2014-01-03

    Sent a pull request to fix the Alloy version of this bug: https://github.com/appcelerator/alloy/pull/292

JSON Source