On 2/4/2014 1:40 PM, waldo kitty wrote:

i have a TSortedCollection that i'm allowing duplicate keys to be
inserted in... the problem that i'm having is that the duplicate keys
are in reverse order from how they were inserted...

Sounds like your TSortedCollection.Compare() needs additional logic. It isn't doing enough comparisons internally to order things properly.

i am overriding MyCollection^.Insert because i have additional tasks
that need to be done at the time of insertion... without duplicate keys,

Wouldn't it be better to perform your additional tasks before the insertion, then call a normal .Insert? Why overload something if there isn't really a need to?
--
Jim Leonard (trix...@oldskool.org)
Check out some trippy MindCandy: http://www.mindcandydvd.com/
A child borne of the home computer wars: http://trixter.oldskool.org/
You're all insane and trying to steal my magic bag!
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to