:: Forum >>

Can't change the whole tree in AW.UI.Tree

Hey, just wondring if it possibly to get help with this.

I'am running AW 2.53 and firefox on vista.

I'am trying to "live" update the whole tree structure, and something is tweeking, because when I push button for update, AW.UI.Tree get lost or maybe I am. But it is something wrong.

var aryText = ['','1','2','3','4','5','6','7','8','9'];
        var aryView = {0:[1,2,3],1:[4,5,6],2:[7,8,9]};

        var tree = new AW.UI.Tree;
        tree.setViewCount(function(i){return aryView[i] ? aryView[i].length : 0});
        tree.setViewIndices(function(i){return aryView[i]});
        tree.setStyle('position', 'absolute');
        tree.setStyle('left', '16px');
        tree.setStyle('top', '62px');
        tree.setStyle('width', '200px');
        tree.setStyle('height', '525px');
        var btnUtfor = new AW.UI.Button;
        btnUtfor.setControlText('Utfør kode');
        btnUtfor.setStyle('position', 'absolute');
        btnUtfor.setStyle('left', '300px');
        btnUtfor.setStyle('top', '460px');
        btnUtfor.setStyle('width', '200px');
        btnUtfor.onControlClicked = function(event){
            aryText = ['','11','12','13','14','15','16','17','18','19'];
            aryView = {0:[1,2,3,4,5,6,7,8,9]};
            //aryText = ['', 'Database', 'Version','Last queries','Last warnings','Last error'];
            //aryView = {0:[1], 1:[2,3,4,5]};
            var obj=AW.object('tree');
            obj.setViewCount(function(i){return aryView[i] ? aryView[i].length : 0});

Monday, August 17, 2009
Just replace the line:
obj.setViewIndices(function(i){return aryView[i]});
Monday, August 17, 2009
uhhh embarassing, but still thanks a lot.
Tuesday, August 18, 2009

This topic is archived.

Back to support forum

Forum search