1. #1
    Ext User
    Join Date
    May 2007
    Location
    Minnesota
    Posts
    66
    Vote Rating
    0
    IGx89 is on a distinguished road

      0  

    Post Ext.data.Node bug moving between children/no_children states

    Ext.data.Node bug moving between children/no_children states


    The problem is that Ext.data.Node's leaf attribute is never modified once it was initially set. Ideally if it has children, leaf should be false; if it doesn't, leaf should be true. The only exception I've found is brought on by AsyncTreeNode marking nodes with remote children but no local children as not being leaves.

    This seems to be the best solution, in Ext.data.Node:
    Code:
        setFirstChild : function(node){
            this.firstChild = node;
    +       this.leaf = node ? false : true;
        },
    If node is null then there are no children, so leaf should be true; otherwise, it should be false. Both appendChild and removeChild call that method, so it's a clean solution. This does not cause any side effects with the above-mentioned exception, AFAIK.

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    Please search before mkaing posts in the bugs forum.

    Leaf is a property that defines a node as a leaf - meaning it has no children and will never have any children. It's a leaf - not a empty branch. Think about a real tree outside on your lawn. Can a leaf one day sprout child leaves or branches?
    Jack Slocum
    Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum
    jack@extjs.com

  3. #3
    Ext User
    Join Date
    May 2007
    Location
    Minnesota
    Posts
    66
    Vote Rating
    0
    IGx89 is on a distinguished road

      0  

    Default


    I was thinking in Computer Science terms, where "a leaf node is a node of a tree data structure that has zero child nodes" and the converse is also holds. In fact your TreePanel also makes that assumption, since nodes with leaf=false but no children (locally or remotely) are still shown as leaves. Inconsistent terminology is always confusing .

    Sorry about not searching very deeply; for others' benefit, this is a thread I just found which gives a cleaner alternative solution (solving the problem through TreePanel instead of Node): http://extjs.com/forum/showthread.php?t=4126

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."