Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-7828

Ti API: Problem with remove method to clear all children in a scrollview

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Medium Medium
    • Resolution: Unresolved
    • Affects Version/s: Release 1.8.0.1
    • Fix Version/s: None
    • Component/s: TiAPI
    • Labels:
    • Environment:

      Titanium mobile sdk 1.8.1.0

      Description

      Hi,

      Lots of problem with remove method. Didn't find any function to clear all children.
      Create a simple scrollView (i guess it's the same for views), add some ImageViews inside and try :

      var simpleView = Ti.UI.createView({
      			id : 'mainView',
      			top : 0,
      			left : 0,
      			layout : 'absolute',
      			width : Ti.Platform.displayCaps.platformWidth,
      			height : Ti.Platform.displayCaps.platformHeight
      		});
      

      or

      var simpleView == Ti.UI.createScrollView({
      			top : 0,
      			zoomScale : 1,
      			minZoomScale : 1,
      			maxZoomScale : 2,
      			width : Ti.Platform.displayCaps.platformWidth,
      			height : Ti.Platform.displayCaps.platformHeight,
      			contentWidth : 'auto',
      			contentHeight : 'auto'
      }
      

      then ...

      var images = [];
      
      for(var i=0; i < 10; i++){
               images.push(Ti.UI.createImageView({
      					image : 'image' + i + '.jpg',
      					width : 600,
      					height : 400,
      					left : 0,
      					top : 0
      				}));
      }
      
      for(var i=0; i<imgs.length; i++){
          simpleView.add(images[i]);
      }
      
      
      var removeChildren = function(view){
      	while(view.children != undefined){
      		view.remove(view.children[0]);
      	}
      }
      
      removeChildren(simpleView);
      

      Getting sometimes :

      "*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";

      at this line :

      while(view.children != undefined)

      I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0 ( http://developer.appcelerator.com/question/131151/emptying-a-view#228486 )

      ********************

      Another method is the following :

      var removeAllChildren = function(viewObject) {
      	if(viewObject.children != undefined){
      		var children = viewObject.children.slice(0);
      		
      		for(var i = 0; i < children.length; i++) {
      			try {
      				viewObject.remove(children[i]);
      			} catch(e) {
      				Ti.API.error('removeAllChildren error : ' + e.message + ' ' + viewObject);
      			}
      		}
      		children = null;
      	}
      }
      

      but there's a warning on each remove invocation (in my case it's a scrollView instead of a view but i guess it's the same pb) :

      called remove for [object TiUIImageView] on [object TiUIScrollView], but [object TiUIImageView] isn't a child or has already been removed
      

      and sometimes i get

      "Result of expression 'viewObject.children' [undefined] is not an object.";

      for line

      if(viewObject.children != undefined)

      ********************

      • In general it's hard to loop through children of a view an to remove some children. This kind of way to do return sometimes an error :
      for(var i=0; i< simpleView.children.length; i++){
      	if(XXXXX){
      		simpleView.remove(player.ui.mainView.children[i]);
      		i--;
              }
      }
      

      at line

      for(var i=0; i< simpleView.children.length; i++)
      it launch sometimes this exception

      "*** -[__NSArrayM objectAtIndex:]: index X beyond bounds [0 .. X]";

      Best Regards

        Activity

        process created issue -
        process made changes -
        Field Original Value New Value
        Comment [ This error :
        Getting sometimes : {code}"*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]"{code};
        is detected at this line ...
        {code}while(view.children != undefined){{code} ]
        process made changes -
        Description Hi,

        Lots of problem with remove method. Didn't find any function to clear all children.
        Create a simple view, add some ImageViews inside and try :

        {code}
        var simpleView = Ti.UI.createView({
        id : 'mainView',
        top : 0,
        left : 0,
        layout : 'absolute',
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight
        });

        var images = [];

        for(var i=0; i < 10; i++){
                 images.push(Ti.UI.createImageView({
        image : 'image' + i + '.jpg',
        width : 600,
        height : 400,
        left : 0,
        top : 0
        }));
        }

        for(var i=0; i<imgs.length; i++){
            simpleView.add(images[i]);
        }


        removeChildren = function(view){
        while(view.children != undefined){
        view.remove(view.children[0]);
        }
        }

        removeChildren(simpleView);
        {code}

        Getting sometimes : "*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";

        I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0
        http://developer.appcelerator.com/question/131151/emptying-a-view#228486

        Hi,

        Lots of problem with remove method. Didn't find any function to clear all children.
        Create a simple view, add some ImageViews inside and try :

        {code}
        var simpleView = Ti.UI.createView({
        id : 'mainView',
        top : 0,
        left : 0,
        layout : 'absolute',
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight
        });

        var images = [];

        for(var i=0; i < 10; i++){
                 images.push(Ti.UI.createImageView({
        image : 'image' + i + '.jpg',
        width : 600,
        height : 400,
        left : 0,
        top : 0
        }));
        }

        for(var i=0; i<imgs.length; i++){
            simpleView.add(images[i]);
        }


        removeChildren = function(view){
        while(view.children != undefined){
        view.remove(view.children[0]);
        }
        }

        removeChildren(simpleView);
        {code}

        Getting sometimes :
        {code}"*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";{code}
        at this line :
        {code}while(view.children != undefined){code}

        I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0
        http://developer.appcelerator.com/question/131151/emptying-a-view#228486

        process made changes -
        Description Hi,

        Lots of problem with remove method. Didn't find any function to clear all children.
        Create a simple view, add some ImageViews inside and try :

        {code}
        var simpleView = Ti.UI.createView({
        id : 'mainView',
        top : 0,
        left : 0,
        layout : 'absolute',
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight
        });

        var images = [];

        for(var i=0; i < 10; i++){
                 images.push(Ti.UI.createImageView({
        image : 'image' + i + '.jpg',
        width : 600,
        height : 400,
        left : 0,
        top : 0
        }));
        }

        for(var i=0; i<imgs.length; i++){
            simpleView.add(images[i]);
        }


        removeChildren = function(view){
        while(view.children != undefined){
        view.remove(view.children[0]);
        }
        }

        removeChildren(simpleView);
        {code}

        Getting sometimes :
        {code}"*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";{code}
        at this line :
        {code}while(view.children != undefined){code}

        I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0
        http://developer.appcelerator.com/question/131151/emptying-a-view#228486

        Hi,

        Lots of problem with remove method. Didn't find any function to clear all children.
        Create a simple scrollView (i guess it's the same for views), add some ImageViews inside and try :

        {code}
        var simpleView = Ti.UI.createView({
        id : 'mainView',
        top : 0,
        left : 0,
        layout : 'absolute',
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight
        });
        {code}
        or
        {code}
        var simpleView == Ti.UI.createScrollView({
        top : 0,
        zoomScale : 1,
        minZoomScale : 1,
        maxZoomScale : 2,
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight,
        contentWidth : 'auto',
        contentHeight : 'auto'
        }
        {code}

        then ...

        {code}
        var images = [];

        for(var i=0; i < 10; i++){
                 images.push(Ti.UI.createImageView({
        image : 'image' + i + '.jpg',
        width : 600,
        height : 400,
        left : 0,
        top : 0
        }));
        }

        for(var i=0; i<imgs.length; i++){
            simpleView.add(images[i]);
        }


        removeChildren = function(view){
        while(view.children != undefined){
        view.remove(view.children[0]);
        }
        }

        removeChildren(simpleView);
        {code}

        Getting sometimes :
        {code}"*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";{code}
        at this line :
        {code}while(view.children != undefined){code}

        I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0
        http://developer.appcelerator.com/question/131151/emptying-a-view#228486

        process made changes -
        Description Hi,

        Lots of problem with remove method. Didn't find any function to clear all children.
        Create a simple scrollView (i guess it's the same for views), add some ImageViews inside and try :

        {code}
        var simpleView = Ti.UI.createView({
        id : 'mainView',
        top : 0,
        left : 0,
        layout : 'absolute',
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight
        });
        {code}
        or
        {code}
        var simpleView == Ti.UI.createScrollView({
        top : 0,
        zoomScale : 1,
        minZoomScale : 1,
        maxZoomScale : 2,
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight,
        contentWidth : 'auto',
        contentHeight : 'auto'
        }
        {code}

        then ...

        {code}
        var images = [];

        for(var i=0; i < 10; i++){
                 images.push(Ti.UI.createImageView({
        image : 'image' + i + '.jpg',
        width : 600,
        height : 400,
        left : 0,
        top : 0
        }));
        }

        for(var i=0; i<imgs.length; i++){
            simpleView.add(images[i]);
        }


        removeChildren = function(view){
        while(view.children != undefined){
        view.remove(view.children[0]);
        }
        }

        removeChildren(simpleView);
        {code}

        Getting sometimes :
        {code}"*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";{code}
        at this line :
        {code}while(view.children != undefined){code}

        I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0
        http://developer.appcelerator.com/question/131151/emptying-a-view#228486

        Hi,

        Lots of problem with remove method. Didn't find any function to clear all children.
        Create a simple scrollView (i guess it's the same for views), add some ImageViews inside and try :

        {code}
        var simpleView = Ti.UI.createView({
        id : 'mainView',
        top : 0,
        left : 0,
        layout : 'absolute',
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight
        });
        {code}
        or
        {code}
        var simpleView == Ti.UI.createScrollView({
        top : 0,
        zoomScale : 1,
        minZoomScale : 1,
        maxZoomScale : 2,
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight,
        contentWidth : 'auto',
        contentHeight : 'auto'
        }
        {code}

        then ...

        {code}
        var images = [];

        for(var i=0; i < 10; i++){
                 images.push(Ti.UI.createImageView({
        image : 'image' + i + '.jpg',
        width : 600,
        height : 400,
        left : 0,
        top : 0
        }));
        }

        for(var i=0; i<imgs.length; i++){
            simpleView.add(images[i]);
        }


        removeChildren = function(view){
        while(view.children != undefined){
        view.remove(view.children[0]);
        }
        }

        removeChildren(simpleView);
        {code}

        Getting sometimes :
        {code}"*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";{code}
        at this line :
        {code}while(view.children != undefined){code}

        I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0
        http://developer.appcelerator.com/question/131151/emptying-a-view#228486

        Best Regards
        process made changes -
        Description Hi,

        Lots of problem with remove method. Didn't find any function to clear all children.
        Create a simple scrollView (i guess it's the same for views), add some ImageViews inside and try :

        {code}
        var simpleView = Ti.UI.createView({
        id : 'mainView',
        top : 0,
        left : 0,
        layout : 'absolute',
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight
        });
        {code}
        or
        {code}
        var simpleView == Ti.UI.createScrollView({
        top : 0,
        zoomScale : 1,
        minZoomScale : 1,
        maxZoomScale : 2,
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight,
        contentWidth : 'auto',
        contentHeight : 'auto'
        }
        {code}

        then ...

        {code}
        var images = [];

        for(var i=0; i < 10; i++){
                 images.push(Ti.UI.createImageView({
        image : 'image' + i + '.jpg',
        width : 600,
        height : 400,
        left : 0,
        top : 0
        }));
        }

        for(var i=0; i<imgs.length; i++){
            simpleView.add(images[i]);
        }


        removeChildren = function(view){
        while(view.children != undefined){
        view.remove(view.children[0]);
        }
        }

        removeChildren(simpleView);
        {code}

        Getting sometimes :
        {code}"*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";{code}
        at this line :
        {code}while(view.children != undefined){code}

        I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0
        http://developer.appcelerator.com/question/131151/emptying-a-view#228486

        Best Regards
        Hi,

        Lots of problem with remove method. Didn't find any function to clear all children.
        Create a simple scrollView (i guess it's the same for views), add some ImageViews inside and try :

        {code}
        var simpleView = Ti.UI.createView({
        id : 'mainView',
        top : 0,
        left : 0,
        layout : 'absolute',
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight
        });
        {code}
        or
        {code}
        var simpleView == Ti.UI.createScrollView({
        top : 0,
        zoomScale : 1,
        minZoomScale : 1,
        maxZoomScale : 2,
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight,
        contentWidth : 'auto',
        contentHeight : 'auto'
        }
        {code}

        then ...

        {code}
        var images = [];

        for(var i=0; i < 10; i++){
                 images.push(Ti.UI.createImageView({
        image : 'image' + i + '.jpg',
        width : 600,
        height : 400,
        left : 0,
        top : 0
        }));
        }

        for(var i=0; i<imgs.length; i++){
            simpleView.add(images[i]);
        }


        removeChildren = function(view){
        while(view.children != undefined){
        view.remove(view.children[0]);
        }
        }

        removeChildren(simpleView);
        {code}

        Getting sometimes :
        {code}"*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";{code}
        at this line :
        {code}while(view.children != undefined){code}

        I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0 ( http://developer.appcelerator.com/question/131151/emptying-a-view#228486 )

        ********************

        Another method is the following :
        {code}
        removeAllChildren = function(viewObject) {
        if(viewObject.children != undefined){
        var children = viewObject.children.slice(0);

        for(var i = 0; i < children.length; i++) {
        try {
        viewObject.remove(children[i]);
        } catch(e) {
        Ti.API.error('removeAllChildren error : ' + e.message + ' ' + viewObject);
        }
        }
        children = null;
        }
        }
        {code}

        but there's a warning on each remove invocation (in my case it's a scrollView instead of a view but i guess it's the same pb) :

        {code}
        called remove for [object TiUIImageView] on [object TiUIScrollView], but [object TiUIImageView] isn't a child or has already been removed
        {code}

        and sometimes i get
        {code}"Result of expression 'viewObject.children' [undefined] is not an object.";{code}
        for line
        {code}if(viewObject.children != undefined){code}

        ********************

        - In general it's hard to loop through children of a view an to remove some children. This kind of way to do return sometimes an error :

        {code}
        for(var i=0; i< simpleView.children.length; i++){
        if(XXXXX){
        simpleView.remove(player.ui.mainView.children[i]);
        i--;
                }
        }
        {code}

        at line {code}for(var i=0; i< simpleView.children.length; i++){code} it launch sometimes this exception
        {code}"*** -[__NSArrayM objectAtIndex:]: index 3 beyond bounds [0 .. 2]";{code}



        Best Regards
        process made changes -
        Description Hi,

        Lots of problem with remove method. Didn't find any function to clear all children.
        Create a simple scrollView (i guess it's the same for views), add some ImageViews inside and try :

        {code}
        var simpleView = Ti.UI.createView({
        id : 'mainView',
        top : 0,
        left : 0,
        layout : 'absolute',
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight
        });
        {code}
        or
        {code}
        var simpleView == Ti.UI.createScrollView({
        top : 0,
        zoomScale : 1,
        minZoomScale : 1,
        maxZoomScale : 2,
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight,
        contentWidth : 'auto',
        contentHeight : 'auto'
        }
        {code}

        then ...

        {code}
        var images = [];

        for(var i=0; i < 10; i++){
                 images.push(Ti.UI.createImageView({
        image : 'image' + i + '.jpg',
        width : 600,
        height : 400,
        left : 0,
        top : 0
        }));
        }

        for(var i=0; i<imgs.length; i++){
            simpleView.add(images[i]);
        }


        removeChildren = function(view){
        while(view.children != undefined){
        view.remove(view.children[0]);
        }
        }

        removeChildren(simpleView);
        {code}

        Getting sometimes :
        {code}"*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";{code}
        at this line :
        {code}while(view.children != undefined){code}

        I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0 ( http://developer.appcelerator.com/question/131151/emptying-a-view#228486 )

        ********************

        Another method is the following :
        {code}
        removeAllChildren = function(viewObject) {
        if(viewObject.children != undefined){
        var children = viewObject.children.slice(0);

        for(var i = 0; i < children.length; i++) {
        try {
        viewObject.remove(children[i]);
        } catch(e) {
        Ti.API.error('removeAllChildren error : ' + e.message + ' ' + viewObject);
        }
        }
        children = null;
        }
        }
        {code}

        but there's a warning on each remove invocation (in my case it's a scrollView instead of a view but i guess it's the same pb) :

        {code}
        called remove for [object TiUIImageView] on [object TiUIScrollView], but [object TiUIImageView] isn't a child or has already been removed
        {code}

        and sometimes i get
        {code}"Result of expression 'viewObject.children' [undefined] is not an object.";{code}
        for line
        {code}if(viewObject.children != undefined){code}

        ********************

        - In general it's hard to loop through children of a view an to remove some children. This kind of way to do return sometimes an error :

        {code}
        for(var i=0; i< simpleView.children.length; i++){
        if(XXXXX){
        simpleView.remove(player.ui.mainView.children[i]);
        i--;
                }
        }
        {code}

        at line {code}for(var i=0; i< simpleView.children.length; i++){code} it launch sometimes this exception
        {code}"*** -[__NSArrayM objectAtIndex:]: index 3 beyond bounds [0 .. 2]";{code}



        Best Regards
        Hi,

        Lots of problem with remove method. Didn't find any function to clear all children.
        Create a simple scrollView (i guess it's the same for views), add some ImageViews inside and try :

        {code}
        var simpleView = Ti.UI.createView({
        id : 'mainView',
        top : 0,
        left : 0,
        layout : 'absolute',
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight
        });
        {code}
        or
        {code}
        var simpleView == Ti.UI.createScrollView({
        top : 0,
        zoomScale : 1,
        minZoomScale : 1,
        maxZoomScale : 2,
        width : Ti.Platform.displayCaps.platformWidth,
        height : Ti.Platform.displayCaps.platformHeight,
        contentWidth : 'auto',
        contentHeight : 'auto'
        }
        {code}

        then ...

        {code}
        var images = [];

        for(var i=0; i < 10; i++){
                 images.push(Ti.UI.createImageView({
        image : 'image' + i + '.jpg',
        width : 600,
        height : 400,
        left : 0,
        top : 0
        }));
        }

        for(var i=0; i<imgs.length; i++){
            simpleView.add(images[i]);
        }


        var removeChildren = function(view){
        while(view.children != undefined){
        view.remove(view.children[0]);
        }
        }

        removeChildren(simpleView);
        {code}

        Getting sometimes :
        {code}"*** -[__NSArrayM objectAtIndex:]: index N beyond bounds [0 .. X]";{code}
        at this line :
        {code}while(view.children != undefined){code}

        I tried other ways to do removeChildren method but none works well on titanium mobile 1.8.1.0 ( http://developer.appcelerator.com/question/131151/emptying-a-view#228486 )

        ********************

        Another method is the following :
        {code}
        var removeAllChildren = function(viewObject) {
        if(viewObject.children != undefined){
        var children = viewObject.children.slice(0);

        for(var i = 0; i < children.length; i++) {
        try {
        viewObject.remove(children[i]);
        } catch(e) {
        Ti.API.error('removeAllChildren error : ' + e.message + ' ' + viewObject);
        }
        }
        children = null;
        }
        }
        {code}

        but there's a warning on each remove invocation (in my case it's a scrollView instead of a view but i guess it's the same pb) :

        {code}
        called remove for [object TiUIImageView] on [object TiUIScrollView], but [object TiUIImageView] isn't a child or has already been removed
        {code}

        and sometimes i get
        {code}"Result of expression 'viewObject.children' [undefined] is not an object.";{code}
        for line
        {code}if(viewObject.children != undefined){code}

        ********************

        - In general it's hard to loop through children of a view an to remove some children. This kind of way to do return sometimes an error :

        {code}
        for(var i=0; i< simpleView.children.length; i++){
        if(XXXXX){
        simpleView.remove(player.ui.mainView.children[i]);
        i--;
                }
        }
        {code}

        at line {code}for(var i=0; i< simpleView.children.length; i++){code} it launch sometimes this exception
        {code}"*** -[__NSArrayM objectAtIndex:]: index X beyond bounds [0 .. X]";{code}



        Best Regards
        process made changes -
        Comment [ Another method is the following :
        {code}
        removeAllChildren = function(viewObject) {
        if(viewObject.children != undefined){
        var children = viewObject.children.slice(0);

        for(var i = 0; i < children.length; i++) {
        try {
        viewObject.remove(children[i]);
        } catch(e) {
        Ti.API.error('removeAllChildren error : ' + e.message + ' ' + viewObject);
        }
        }
        children = null;
        }
        }
        {code}

        but there's a warning on each remove invocation (in my case it's a scrollView instead of a view but i guess it's the same pb) :

        {code}
        called remove for [object TiUIImageView] on [object TiUIScrollView], but [object TiUIImageView] isn't a child or has already been removed
        {code}

        and sometimes i get
        {code}"Result of expression 'viewObject.children' [undefined] is not an object.";{code}
        for line
        {code}if(viewObject.children != undefined){code} ]
        Mauro Parra-Miranda made changes -
        Assignee Shak Hossain [ shossain ] Mauro Parra-Miranda [ mpmiranda ]
        Mauro Parra-Miranda made changes -
        Project Titanium (Community) [ 10190 ] Titanium Mobile [ 10153 ]
        Key TC-680 TIMOB-7828
        Issue Type Bug [ 1 ] New Feature [ 2 ]
        Workflow jira [ 102012 ] Titanium full [ 102123 ]
        Hide
        Ivan Skugor added a comment -

        "Result of expression 'viewObject.children' [undefined] is not an object." - you got that message because you passed "undefined" instead of TiView into that function.

        It can be avoided by modifying that line so it checks if value is falsy: "if(viewObject && viewObject.children != undefined)"

        Show
        Ivan Skugor added a comment - "Result of expression 'viewObject.children' [undefined] is not an object." - you got that message because you passed "undefined" instead of TiView into that function. It can be avoided by modifying that line so it checks if value is falsy: "if(viewObject && viewObject.children != undefined)"
        Hide
        process added a comment -

        I think there's a latency between the time when remove method is called and when view.length is updated

        Show
        process added a comment - I think there's a latency between the time when remove method is called and when view.length is updated
        Shak Hossain made changes -
        Summary Pb with remove Problem with remove method to clear all children in a scrollview
        Priority None [ 6 ]
        Assignee Mauro Parra-Miranda [ mpmiranda ] Neeraj Gupta [ ngupta ]
        Component/s Ti API [ 10224 ]
        Neeraj Gupta made changes -
        Summary Problem with remove method to clear all children in a scrollview Ti API: Problem with remove method to clear all children in a scrollview
        Priority None [ 6 ] Medium [ 3 ]
        Labels bounds children children.length of out remove core
        Affects Version/s Release 1.8.0.1 [ 12580 ]
        Steven Savage made changes -
        Assignee Neeraj Gupta [ ngupta ] Ingo Muschenetz [ ingo ]

          People

          • Assignee:
            Ingo Muschenetz
            Reporter:
            process
          • Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: