Apart from that, you can get differently ordered data if
ordering is ambiguous...
----- Original Message -----
From: "Mark Smith" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 8:18 PM
Subject: Re: Sort does not work consistently
> "Ed Lineberry" <[EMAIL PROTECTED]> wrote:
> >static int CompareTimesheet( PackedTimesheet *ts1, PackedTimesheet *ts2,
> >Int unusedInt, SortRecordInfoPtr unused1, SortRecordInfoPtr unused2,
> >VoidHand appInfoH )
> >{
> > int result;
> >
> > result = (ts1->date < ts2->date);
> >
> > return result;
> >}
>
> I'm not sure if it's your problem, but this doesn't
> look like a correct sort function. It should return
> a negative value, 0, or a positive value depending on
> whether ts1 is considered less than, equal to, or
> greater than ts2 respectively. This function says
> the following:
>
> if ts1->date < ts2->date : ts1 > ts2
> if ts1->date = ts2->date : ts1 = ts2
> if ts1->date > ts2->date : ts1 = ts2 ???
>
> Is this really what you want it to do?
>
> --
> -M- [EMAIL PROTECTED]
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/