[Coco] sorting Delphi messages

Roger Taylor operator at coco3.com
Tue Sep 15 00:24:23 EDT 2009



I'm thinking this might be a good solution:

* locate the thread starters
iterate through every Delphi message in any order, ignoring those 
marked as SORTED
  (as in a hash table output, or sorted list, doesn't matter) 
locating all Original Posts
mark each as SORTED and APPEND it to a new indexed list of messages

* insert each reply right after its parent in the new table, ignoring 
those marked as SORTED
iterate through every Delphi message in any order locating all 
messages having a parent
mark that message as SORTED, insert it after it's parent in the new 
table (the ID will have to be found in the list)

This should provide a way to make a sorted list of message IDs where 
there's a Starter msg followed by all threads/subthreads.


Once I get this formula down, I'll use it for all imported CoCo 
archives.  Sure, I could cheat and easily import each message as a 
new Post in the blog, what what a nightmare it would be to try to 
follow threads.  No way.
What's even better is if I could preserve the nested threads but this 
all depends on how the above algorithm can be improved, but I might 
need some help in this department.

-- 
~ signature section for all e-mails-
~ While I have seen Many annoying taglines over the years, I've never 
really complained, but here's mine:
~ Roger Taylor
~ http://www.americafedup.com




More information about the Coco mailing list