<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-02-05 waldo kitty <span dir="ltr"><<a href="mailto:wkitty42@windstream.net" target="_blank">wkitty42@windstream.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

On 2/4/2014 5:16 PM, Frederic Da Vitoria wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2014-02-04 waldo kitty <<a href="mailto:wkitty42@windstream.net" target="_blank">wkitty42@windstream.net</a> <mailto:<a href="mailto:wkitty42@windstream.net" target="_blank">wkitty42@windstream.<u></u>net</a>>>:<br>


</blockquote>
[...]<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    i kinda thought about that earlier when i was digging thru the code... IIRC,<br>
    insert was overridden because there are cases where the existing record<br>
    needs to be replaced (because the new record is newer) using AtPut and the<br>
    non-added records must be logged and their reason for not being added (older<br>
    or same)...<br>
<br>
<br>
Just a quick idea which could be completely wrong, but wouldn't it solve your<br>
issue if Compare always returned -1 instead of 0?<br>
</blockquote>
<br></div>
no, because i lose (at least) the logging of why the record was tossed out... see below... </blockquote><div><br></div><div>Hm, yes, you don't always want to keep duplicates.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

it wouldn't help with the duplicate keys being inserted in reverse order...<br></blockquote><div><br></div><div>Once again I did not test this, but it seems to me that if Compare returned -1 instead of 0, any duplicate would be inserted after because it would never be considered as equal to any other. But since you still want your collection to be able to choose between skipping duplicates or keeping them, the Compare modification would have to be slightly more subtle, something like:<br>

<br></div><div style="margin-left:40px"><span style="font-family:courier new,monospace">if result = 0 and Duplicates<br></span></div><div style="margin-left:40px"><span style="font-family:courier new,monospace">    then result := -1 </span><br>

<br></div><div>at the end of the Compare function.<br clear="all"></div></div><br>-- <br>Frederic Da Vitoria<br>(davitof)<br><br>Membre de l'April - « promouvoir et défendre le logiciel libre » - <a href="http://www.april.org" target="_blank">http://www.april.org</a><br>


</div></div>