James wrote:

> Luc Le Blanc wrote:
> > Users would like to be able to abort a (long) sort processed by
> > SysInsertionSort. Can this be done?
> >
> > I am not sure the event handler can receive a penDownEvent on
> > the screen while this API is running, and I don't see how I can
> > abort this API, even through the comparison callback function
> > (that I could alert via a global).
>
> > The only solution I see is to code my own SysInsertionSort and
> > check for events regularly. Better ideas?

> I suppose this is a stupid question, but can you instead simply
> reduce the sorting time by using SysQSort? Why are you using
> SysInsertionSort?


IIRC, the insertion sort is a stable sort (it doesn't move records that don't 
need to move), so it's convenient if you have 2-level sorts (ex. by name, then 
by first name).

But whichever sort I use, sorting 30000 items takes times, and this can be 
annoying when the user triggers the sort accidentally by mis-tapping on the 
column header.


Luc Le Blanc
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to