Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11479] iOS: Scrollview - An application crashes on launch

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2012-10-14T06:46:24.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsiOS
Labelsmodule_scrollview, qe-ios100112, qe-testadded, regression
ReporterOlga Romero
AssigneeVishal Duggal
Created2012-10-13T21:51:00.000+0000
Updated2014-06-19T12:43:23.000+0000

Description

An application crashes on launch in module Scrollview. *regression, works on 2.1.3* Test steps: 1.Run the code below
var win = Ti.UI.createWindow();
win.open();
 
    
var scrollView = Ti.UI.createScrollView({
    contentHeight:'auto',
    contentWidth:0,
    layout:'horizontal',
    backgroundColor: 'green'
});
win.add(scrollView);
   
var colors = ['red', 'blue', 'pink', 'white', 'black'];
    
var max = 120;
for(var i = 0; i < max; i++){
    var view = Ti.UI.createView({
        backgroundColor: colors[i%colors.length],
        borderColor:'gray',
        borderWidth:4,
        height: 100,
        left: 10,
        width: 100,
        top: 10
    });
     
    view.addEventListener('click', function(_event){
        scrollView.remove(_event.source);
    });
    scrollView.add(view);
}

Actual result: Crash Expected result: No crash There will be a grid in which a View of 5 colours (red,blue,pink,white and black) will appear.

Comments

  1. Olga Romero 2012-10-17

    Closing as Duplicate

JSON Source