Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Vanilla sorting is much better' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Vanilla sorting is much better
Authored by: podd on May 18, '04 05:12:32AM

There are some very powerful, robust vanilla sorting routines in the List library at AppleMods.

Here's an example of use:

property _Loader : run application "LoaderServer"

----------------------------------------------------------------------
-- DEPENDENCIES

property _List : missing value

on __load__(loader)
    set _List to loader's loadLib("List")
end __load__

----------------------------------------------------------------------

__load__(_Loader's makeLoader())


-- DEMO
_List's sortList({"c", "b", "e", "a", "d"}) --> {"a", "b", "c", "d", "e"}

Notes: Most of this code is just auto-generated boilerplate used to load the List library. The actual sorting is done by the sortList command in the last line.

(Obligatory disclosure: I wrote the List library.)



[ Reply to This | # ]