Can anyone fill me in on what is going on with the sorting of delayed notes? I can’t make heads or tails of what the sorting algorithm is. I feel like, if it has to sort only one way, with no user control, it should sort with latest (real-time) entry on top.
I searched for other entries on this topic, but couldn’t find any.
Thank you, I’m attaching an image showing the error. I’ve got lots of entries from a test game I am running. But, I’ve experienced confusion a few times, having lost the message that “should be there”…eventually finding them at the bottom of the list. In the image, you will see the earliest set of entries in the window in the proper order. Then the last five are completely in the wrong place.
I just reproduced the problem in a dedicated test module so I could be more precise. It seems that there is a re-ordering that happens when a game is saved and then re-opened. In the test I just ran, I created 15 Delayed Notes, retiring back and forth to each opponent’s side after 1-3 messages…no errors. Then I saved the game and re-opened it. All of the Delayed notes were in reverse order, with oldest on top and youngest on bottom…every new entry I made from there was then created on the top of the list…creating a new proper order on top of the reverse-ordered list. So, we wind up with multiple reverse-ordered lists stacked on top of one another…using Vassal 3.6.6.
The member function which makes columns sortable didn’t exist prior to Java 6, but we supported Java 5 through 3.2.17 so couldn’t use that function before.
The Delayed Notes entries on this build maintain the proper order. The only thing you may wish to address is the fact that loading a previously saved game with a disordered list does not correct the order, even though the human-readable time stamp of the mis-ordered entries appear to be sortable.
Almost perfect…you can see something weird is still happening in the attached image. Here’s what I think I’m seeing…It is misordered because the sorting algo is only looking at the time-stamp to the minute and ignoring anything past that. Also, it is secretly using the “Note Name” column as the secondary sort field. Therefore, when I sort in reverse order, it looks perfect, but when I sort with latest on top, every entry with the same time-to-the-minute gets ordered by “Note Name”. So, my guess is, the algo truncates the time to the minute. I suspect the underlying data element has more granularity than that.