Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2333] Android: Add children as array not working

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionWon't Fix
Resolution Date2012-12-10T08:34:43.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsadd, array, children, component, triage
ReporterJan Helleman
AssigneeMauro Parra-Miranda
Created2012-10-19T23:01:56.000+0000
Updated2016-03-08T07:41:21.000+0000

Description

On iOS, I can "add" children as an array to a component. On Android this crashes the application:

var window = Ti.UI.createWindow({backgroundColor:'white'});

var btn1 = Ti.UI.createButton({title:'test1'});
var btn2 = Ti.UI.createButton({title:'test2', enabled: false, top: 100});

window.add([btn1, btn2]);


window.open();

Comments

  1. Daniel Sefton 2012-12-10

    Hi Jan, This isn't actually supported behavior. In theory it shouldn't work on iOS either. Admittedly we should perhaps fail a bit more gracefully. Cheers.
  2. Ivan Skugor 2012-12-10

    Too bad this won't be implemented since in theory it should bring greater performance.

JSON Source