Skip navigation.
 
mlRe: more on stable sorting...
FROM : Steve Mykytyn
DATE : Wed Nov 20 21:13:46 2002

agreed that a user click interface is simple, the added complexity for
the coder comes first from implementing some kind of way to remember
previous sorts, and then from having to deal with cases where a user
deletes or adds columns or rows following sorts.  The nice part about
having an index produced by a stable sort is that it in some sense
"encodes" all the previous sorting history without having to fool
around with coding anything.

A stable sort would make me implement nothing to get the expected
behavior, as opposed to an "extremely simple" solution.  I can't goof
up implementing nothing...

All in all, a stable option would be a nice thing that would save many
people from having to reinvent the wheel over and over again...  and
the mainline sorting vendors, like SyncSort, have always provided this
and many other functions to control the way sorts are done.

Now I'm hesitating to suggest that it would be nice to have a "merge"
method to combine two ordered NSArrays...


On Wednesday, November 20, 2002, at 11:38  AM, matt neuburg wrote:

> On Tue, 19 Nov 2002 12:20:53 -0800, Steve Mykytyn
> <<email_removed>> said:
>

>> memory.  The best workaround for my purpose is to keep a small
>> persistent list of the most recently sorted columns, and use those to
>> break ties as needed.  But a good deal of complexity, either user
>> interface or coding,  is introduced with any solution i've come up
>> with
>> so far.

>
> I don't understand that part of the statement. In a table, for
> example, I can let the user sort a column by clicking the header, then
> sort another column persistently by shift-clicking the header. That
> not only is not a complex user interface, it is the expected user
> interface. The code that deals with this works just as you describe
> above and is extremely simple too. Since Cocoa lets you slot your own
> comparison routine into any sorting action I just don't see what's to
> be gained by having something built into the framework that is so easy
> to implement yourself. m.
>
> matt neuburg, phd = <email_removed>, http://www.tidbits.com/matt
> pantes anthropoi tou eidenai oregontai phusei
> Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/

_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlmore on stable sorting... Steve Mykytyn Nov 19, 21:20
mlRe: more on stable sorting... Buddy Kurz Nov 20, 16:54
mlRe: more on stable sorting... matt neuburg Nov 20, 20:38
mlRe: more on stable sorting... Steve Mykytyn Nov 20, 21:13
mlRe: more on stable sorting... Philippe Mougin Nov 22, 12:09
mlRe: more on stable sorting... Chris Hanson Nov 22, 12:57
mlRe: more on stable sorting... Sam Griffith Nov 22, 16:01
mlRe: more on stable sorting... Chris Hanson Nov 22, 18:53
mlRe: more on stable sorting... Dennis De Mars Nov 22, 22:12
mlRe: more on stable sorting... Chris Kane Dec 8, 02:03