Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16835] BlackBerry: Ti.UI.View getChildren returns empty array

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionHold
Resolution Date2015-04-14T17:12:30.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsBlackBerry
Labelsblackberry, look1
ReporterSteven Saracut
AssigneePedro Enrique
Created2014-04-08T11:59:56.000+0000
Updated2017-03-16T20:22:14.000+0000

Description

Following code outputs: [INFO] button1 type: [object TiUIButtonProxy] [INFO] children : []

var mainWindow = Titanium.UI.createWindow({
    backgroundColor: 'red',
    title: 'Red Window'
});


	// Create a Button.
	var button1 = Ti.UI.createButton({
		title : 'button1',
		height : Ti.UI.SIZE,
		width : Ti.UI.SIZE
	});
	
	Ti.API.info("button1 type: " + button1);
	
	
	// Add to the parent view.
	mainWindow.add(button1);

	// Listen for click events.
	button1.addEventListener('click', function() {
		Ti.API.info('\'button1\' was clicked! : pre-eventListener');
		
	});

Ti.API.info('children : ' + JSON.stringify(mainWindow.getChildren()));

Comments

  1. Steven Saracut 2014-04-08

    Actually looking deeper in the code, how come Ti.UI.Window doesn't extend Ti.UI.View like android and ios which is how the API is documented? I guess this explains the ticket I opened a while ago about the scrollview not taking a window like ios and android.
  2. Ingo Muschenetz 2014-06-24

    Since it appears to be working as expected, can we resolve?
  3. Ingo Muschenetz 2015-04-14

    Placing these items on hold for the moment based on community interest.
  4. Lee Morris 2017-03-16

    Closing ticket as BlackBerry is no longer supported by us.

JSON Source