Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4412] TableViewRow with a window and table reference causes crash

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2019-04-05T20:35:34.000+0000
Affected Version/sRelease 1.7.0, Release 3.1.0, Release 3.2.0
Fix Version/sn/a
ComponentsiOS
LabelsengTriage, reprod, supportTeam
ReporterPedro Enrique
AssigneeEric Merriman
Created2011-06-14T13:54:01.000+0000
Updated2019-04-05T20:35:34.000+0000

Description

The problem

The following code crashes the app when clicked on the row.

The details

Inserting UI elements and calling them, like window and it's components, crashes when they are called. The best way to describe the situation is with the following code.

The code

// create ui objects
var row = Ti.UI.createTableViewRow ({
   win   : Ti.UI.createWindow (), 
   table : Ti.UI.createTableView (), 
   data  : [ 
      Ti.UI.createTableViewRow ({title:"row1"}),
      Ti.UI.createTableViewRow ({title:"row2"})
   ],  
   title : "Click me!"
});
var win = Ti.UI.createWindow (); 
var table = Ti.UI.createTableView (); 

// setup ui objects

win.add (table);
table.setData ([row]);
win.open (); 

var onClick = function (e) 
{
   Ti.API.debug (e.row.win);
   Ti.API.debug (e.row.table);
   if (e.row.win != null) // open up the window
   {   
      e.row.win.add (e.row.table);
      e.row.table.setData (e.row.data);
      e.row.win.open (); 
   }   
};

table.addEventListener ('click', onClick);

Helpdesk ticket:

APP-899173

Comments

  1. jithinpv 2013-05-09

    issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Lee Morris 2017-05-24

    I was able to reproduce this issue with the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.9.0.201705021158 Ti SDK 6.1.0.v20170519131839 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.7.0_80

JSON Source