View Single Post
  #1  
Old 07-27-2006, 08:37 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Tree Views + Loadarray

In a textfile, I have this:

PHP Code:
Leader=Leader
Leader.1
=KuJi
Leader
.Generals=Generals
Leader
.Generals.1=General1
Leader
.Generals.1.1=Test1
Leader
.Generals.2=General2
Leader
.Generals.2.1=Test1
Leader
.Generals.2.2=Test2
Leader
.Generals.3=General3
Leader
.Generals.3.1=Test1
Leader
.Generals.3.2=Test2
Leader
.Generals.3.3=Test3 
On serverside, I load the text file to an object, then save it as an array and trigger it to the clientside.

PHP Code:
this.gang_ranks = new TStaticVar(); 
this.gang_ranks.clear();
this.gang_ranks.loadvars("/gangs/" params[1] @ "_ranks.txt");  
temp.rankholder this.gang_ranks.savevarstoarray(true); 
Then I load it in a tree. Only thing is temp.rankholder doesn't keep the same sort order as the text file and it mixes up the order of the ranks which in the tree view mess it up. So I couldn't find out why, so I tried to find a way to get the treenodes to sort and I can't get that to work either. If you know how to make the vars not sort, or you know how to sort treenodes please help :o
Reply With Quote