sorting non-numeric keys table with custom function ?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: sorting non-numeric keys table with custom function ?
- From: Valerio Schiavoni <valerio.schiavoni@...>
- Date: 2010年2月24日 01:04:42 +0100
Hello,
can anyone explain me how to sort a table whose keys are strings using a custom sorting function ?
It doesn't seem to work (table is not sorted, because the comparator function is not executed).
The tables i want to sort look more or less like to this :
local t = {}
t["03:05:30"] = 80
t["04:05:21"] = 40
t["01:03:03"] = 20
...
Thanks for any suggestion,
Valerio