<div dir="ltr">You have a logic issue with the first one:<div><span style="font-size:12.8000001907349px">sortedNotes</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">^notes sort:[:a :b | (a date = b date) and:[a temps > b temps]] .</span><br></div><div><span style="font-size:12.8000001907349px">This is saying that the the two dates are different, then false. For this you probably want to be something like:</span></div><div><span style="font-size:12.8000001907349px">sortedNotes</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">^notes sort:[:a :b | a date > b date or: [(a date = b date) and:[a temps > b temps]]] .</span><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">-cbc</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 4, 2015 at 10:22 AM, Raymond Asselin <span dir="ltr"><<a href="mailto:jgr.asselin@me.com" target="_blank">jgr.asselin@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For now I implemented:<br>
<br>
sortedNotes<br>
^notes sort:[:a :b | (a date = b date) and:[a temps > b temps]] .<br>
<br>
AND<br>
<br>
notesSorted<br>
^notes sort:[:a :b | a date = b date<br>
<span class=""> ifTrue:[a temps > b temps]<br>
</span> ifFalse:[a date > b date]] .<br>
<br>
does exactly the same result.<br>
<br>
But there is still notes in a same date that do not sort correctly, the begining is good and after 5 or so objects<br>
I get some witch do not seem to be sorted.<br>
<br>
BTW don't know the difference between sort: and sorted:<br>
it seems as if the last one produce a new collection and the first one produce same collection but sorted.<br>
<br>
Note: I use 24 hours instead of a.m. / p.m. is this may cause problems?<br>
<br>
> Le 2015-02-04 à 12:00, Paul DeBruicker <<a href="mailto:pdebruic@gmail.com">pdebruic@gmail.com</a>> a écrit :<br>
<span class="im HOEnZb">><br>
> a date = b date<br>
> ifTrue:[a temps > b temps]<br>
> ifFalse:[a date > b date]<br>
<br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div>