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
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
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