Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-14214

iOS: SplitWindow with showMasterInPortrait=true causes app to exit with Alloy

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Release 3.1.0
    • Fix Version/s: None
    • Component/s: iOS
    • Environment:

      iOS (iPad Simualtor)
      Mobile SDK 3.1.0GA (With Alloy MVC)

      Description

      Problem
      The Alloy code below causes the app and simulator to exit when opening the SplitWindow. Removing showMasterInPortrait property from SplitWindow tag makes it work as usual. The property in the standard test case below works fine.

      Steps to reproduce
      1. Drop the code below into a new Default Alloy Project
      2. Run in iPad simulator
      3. Observe app and simulator exit
      4. Remove property, run again and it doesn't exit

      index.xml

       
      <Alloy>
      	<SplitWindow showMasterInPortrait="true" platform="ios" formFactor="tablet">
      		<TabGroup>
      			<Tab title="tab 1">
      				<Window title="tab 1">
      					<Label>tab 1</Label>
      				</Window>
      			</Tab>
      			<Tab title="tab 2">
      				<Window title="tab 2">
      					<Label>tab 2</Label>
      				</Window>
      			</Tab>
      		</TabGroup>
      		<Window>
      			<Label>This is the detail</Label>
      		</Window>
      	</SplitWindow>
      </Alloy>
      

      index.js

      $.index.open();

      Standard test case (doesn't crash)

      var win = Ti.UI.createWindow();
       
      var nav = Ti.UI.iPhone.createNavigationGroup({
         window: win
      });
       
      var masterView = Ti.UI.createWindow();
       
      var splitwin = Ti.UI.iPad.createSplitWindow({
          detailView: nav,
          masterView: masterView,
          showMasterInPortrait: true
      });
       
      splitwin.addEventListener('visible',function(e){
          if (e.view == 'detail'){
              e.button.title = "Master";
              win.leftNavButton = e.button;
          } else if (e.view == 'master'){
              win.leftNavButton = null;
          }
      });
       
      splitwin.open();
      

      Standard test case (crashes... Is Alloy calling tabGroup.open?)

      var win = Ti.UI.createWindow({
      	backgroundColor : "#FFF"
      });
       
      var tabGroup = Titanium.UI.createTabGroup({
      	id : 'tabGroup1'
      });
       
      var win1 = Ti.UI.createWindow();
       
      var tab1 = Titanium.UI.createTab({
      	icon : 'KS_nav_ui.png',
      	window : win1
      });
       
      tabGroup.addTab(tab1);
       
      var detailView = Ti.UI.createWindow();
       
      var splitwin = Ti.UI.iPad.createSplitWindow({
      	detailView : detailView,
      	masterView : tabGroup,
      	showMasterInPortrait : true
      });
       
      splitwin.addEventListener('visible', function(e) {
      	if (e.view == 'detail') {
      		e.button.title = "Master";
      		win.leftNavButton = e.button;
      	} else if (e.view == 'master') {
      		win.leftNavButton = null;
      	}
      });
       
      tabGroup.open(); // simulator and app exits
      splitwin.open();

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mano.mykingdom Manoj Kumar
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-16732
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code