
01-07-2011, 11:59 PM
|
Registered User
|
 |
Join Date: Apr 2006
Location: TN
Posts: 114
|
|
Quote:
Originally Posted by WhiteDragon
Uh, this works for sortascending?
Way 1
Store the number in a subvariable for each item in the array, then use sortbyvalue:
PHP Code:
temp.xs = {1,6,7,3,2,1,5,23,41,75,2347,51,123};
for (temp.i = 0; temp.i < temp.xs.size(); temp.i++) {
temp.xs[temp.i].blah = temp.xs[temp.i];
}
temp.xs.sortbyvalue("blah", "float", true);
|
This worked for me, but I'm unsure why the .blah was needed when assigning. I'm not sure if the other is for GUIs or not, but thanks for the help! |
__________________
Zie
"It is not necessary to change. Survival is not mandatory." - W. Edwards Deming
|
|
|