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

iOS: Closing a window containing a tableView causes the tableView data to be destroyed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: Release 1.6.2
    • Fix Version/s: Sprint 2011-21
    • Component/s: iOS
    • Environment:

      TiSDK 1.6.2, iOS 4.3

      Description

      If you close a window that contains a tableView, the tableView data will be destroyed, but the table is still intact.

      Step 1: run the example below
      Step 2: click the test button
      Step 3: notice the [object TiUITableViewSection] alert
      Step 4: click the open button
      Step 5: click the close button
      Step 6: click the test button
      Step 7: notice the TiUITableViewSection does not exist

      var win1 = Ti.UI.createWindow({
      	backgroundColor: 'green'
      });
       
      var data = [{title:"Row 1"},{title:"Row 2"}];
      var table = Titanium.UI.createTableView({data:data});
       
      var openButton = Ti.UI.createButton({
      	title: 'Open',
      	height: 50,
      	width: 200,
      });
      openButton.addEventListener('click', function(e){
      	var win2 = Ti.UI.createWindow({
      		backgroundColor: 'blue'
      	});
       
      	win2.add(table);
      	
      	var closeButton = Ti.UI.createButton({
      		title: 'Close',
      		height: 50,
      		width: 200,
      		bottom: 70
      	});
      	closeButton.addEventListener('click', function(e){
      		win2.close();
      	});
      	win2.add(closeButton);
      	
      	win2.open();
      });
       
      var testButton = Ti.UI.createButton({
      	title: 'Test',
      	height: 50,
      	width: 200,
      	bottom: 10
      });
      testButton.addEventListener('click', function(e){
      	alert(table.data[0]);
      	// alert(table);
      });
      win1.add(testButton);
      win1.add(openButton);
      win1.open();

      Associated Helpdesk Ticket

      http://appc.me/c/IBS-79527-881

        Attachments

          Activity

            People

            • Assignee:
              blainhamon Blain Hamon
              Reporter:
              jalter Jon Alter
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration