Game Development Community

TextList.sort Question

by Ronald J Nelson · in Torque Game Engine · 12/13/2005 (8:55 am) · 2 replies

With textList.sort I know you can sort a column by "increasing" but is there a way to do it by "decreasing?

By the way the word decreasing instead of increasing doesn't work.

#1
12/13/2005 (1:43 pm)
OK I figured this one out and can get it to sort my servers no problem for ascending order then descending. However I have a pretty big problem, it isn't allowing me to select any of the other servers even if I never use my sort functions, it still only allows me to select the same sever not matter what I select. Here is my code:

function joinLanGui::join(%this)
{
   cancelServerQuery();
   %id = JL_serverList.getSelectedId();

   // The server info index is stored in the row along with the
   // rest of displayed info.
   %index = getField(JL_serverList.getRowTextById(%id),6);
   if (setServerInfo(%index)) {
      %conn = new GameConnection(ServerConnection);
      %conn.setConnectArgs($pref::Player::Name);
      %conn.setJoinPassword($Client::Password);
      %conn.connect($ServerInfo::Address);
   }
}

//----------------------------------------
function joinLanGui::refresh(%this)
{
   cancelServerQuery();
   %id = JL_serverList.getSelectedId();

   // The server info index is stored in the row along with the
   // rest of displayed info.
   %index = getField(JL_serverList.getRowTextById(%id),6);
   if (setServerInfo(%index)) {
      querySingleServer( $ServerInfo::Address, 0 );
   }
}

//----------------------------------------
function joinLanGui::refreshSelectedServer( %this )
{
   querySingleServer( $JoinGameAddress, 0 );
}

Any help you can give would really be appreciated.
#2
12/13/2005 (9:56 pm)
Well it looks like someone beat me to this:

http://www.garagegames.com/mg/forums/result.thread.php?qt=36701

Although I had to use a 4.