Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-7240

Android: OptionDialog can't be called several times after a tabgroup is opened and closed.

    Details

      Description

      Problem Description

      Ti.UI.OptionDialog can be called multiple times in SDK 1.8 without problems, but not after a TabGroup is opened and then closed. Happening on both v8 and rhino.

      Steps to reproduce

      1. Add this code to a new mobile project

      var w = Ti.UI.createWindow({
      	backgroundColor: 'red',
      	fullscreen: false,
      	exitOnClose: true
      });
      
      var b = Ti.UI.createButton({
      	height: 50,
      	title: 'click'
      });
      
      b.addEventListener('click', function(e) {
      	var optDlg = Ti.UI.createOptionDialog({
      		title: 'choose',
      		options: ['open', 'dismiss']
      	});
      
      	optDlg.addEventListener('click', function(e) {
      		if (e.index===0) {
      			var t = Ti.UI.createTabGroup(),
      				w1 = Ti.UI.createWindow({
      					title: 'blue',
      					backgroundColor: 'blue'
      				}),
      				b1 = Ti.UI.createButton({
      					title: 'close'
      				}),
      				t1 = Ti.UI.createTab({
      					title: 'blue',
      					window: w1
      				});
      
      			w1.add(b1);
      			b1.addEventListener('click', function(e){
      				t.close();
      			});
      			t.addTab(t1);	
      			t.open();
      		}
      	});
      
      	optDlg.show();
      	Ti.API.info('must be showing dlg');
      });
      
      w.add(b);
      w.open();
      

      2. Click the button
      3. Select something.
      4. Close
      5. click open again

      ACTUAL RESULTS

      The openDialog doesn't open

      EXPECTED RESULTS

      openDialog should work.

      MORE INFO

      It's working fine in 1.7.5

        Issue Links

          Activity

          Hide
          Hieu Pham added a comment -

          Reopen this issue b/c the previous PR for this has a mistake - It didn't remove the tab activity properly when back key is hit.

          Show
          Hieu Pham added a comment - Reopen this issue b/c the previous PR for this has a mistake - It didn't remove the tab activity properly when back key is hit.
          Show
          Hieu Pham added a comment - New PR https://github.com/appcelerator/titanium_mobile/pull/1369
          Hide
          Dustin Hyde added a comment -

          Closing as Fixed.
          SDK: 1.9.0.v20120207124634
          Studio: 1.0.8.201201262211
          OS: Lion
          Devices Tested: Android Emulator 2.2, Xoom 3.2.1

          Show
          Dustin Hyde added a comment - Closing as Fixed. SDK: 1.9.0.v20120207124634 Studio: 1.0.8.201201262211 OS: Lion Devices Tested: Android Emulator 2.2, Xoom 3.2.1
          Hide
          Neeraj Gupta added a comment -

          Reopening based on Hieu's latest comments.

          Show
          Neeraj Gupta added a comment - Reopening based on Hieu's latest comments.
          Hide
          Opie Cyrus added a comment -

          crash occurred during testing after opening and closing the dialog and window roughly 3-6 times. Repeatable.

          Crash log: http://pastie.org/3338185

          Show
          Opie Cyrus added a comment - crash occurred during testing after opening and closing the dialog and window roughly 3-6 times. Repeatable. Crash log: http://pastie.org/3338185
          Hide
          Thomas Huelbert added a comment -

          see test comments from Opie.

          Show
          Thomas Huelbert added a comment - see test comments from Opie.
          Hide
          Dustin Hyde added a comment -

          Re-closing as Fixed.
          The crash behavior was due to https://jira.appcelerator.org/browse/TIMOB-7572 and https://jira.appcelerator.org/browse/TIMOB-7573.
          Verified on:
          SDK: 1.9.0.v20120213100134
          Android: V8/Rhino
          Studio: 1.0.8.201201262211
          OS: Lion
          Devices Tested: Droid3 2.3.4

          Show
          Dustin Hyde added a comment - Re-closing as Fixed. The crash behavior was due to https://jira.appcelerator.org/browse/TIMOB-7572 and https://jira.appcelerator.org/browse/TIMOB-7573 . Verified on: SDK: 1.9.0.v20120213100134 Android: V8/Rhino Studio: 1.0.8.201201262211 OS: Lion Devices Tested: Droid3 2.3.4

            People

            • Assignee:
              Hieu Pham
              Reporter:
              Mauro Parra-Miranda
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development