List sorting (Notes etc.) [FIXED]

Page 1 of 1
6 posts
List sorting (Notes etc.) [FIXED]

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
Okay, been working on this all night trying out many things I read about on the net. None of them worked until I tried something out just for fun. You could say I stumbled upon it, but here is the code I have changed for the notes column:
Code: Select all
case COL_NOTES:
      if (elem1->notes_.Cmp(elem2->notes_)  < 0)
         return asc;
      else
         if (elem1->notes_.Cmp(elem2->notes_)  > 0)
            return !asc;       
       break;


At first I was trying with single letters and was quite surprised when they lined up properly. So I dried words, then multy-worded entries. This only seems to work on the Notes column at the moment, so I am thinking of doing an if ...condition1 AND condition2 asc, etc.

At any rate here's a screenshot of how notes works now. We should probably add a line to update the table when someone updates/changes an entry. I noticed that when I entered new words, they weren't sorted properly until I clicked on the column again.
Attachments
Screen shot 2009-10-26 at 4.26.02 AM.png
(16.21 KiB) Downloaded 1197 times
Re: List sorting (Notes etc.)

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
So, for a minute there I was psyching myself out. I had made so many changes to the code and was so happy that one column was working. But I soon found that none of the other columns worked and that the notes column was always ordered correctly.

So I trashed the files and did a fresh update. After making the same minor change that I posted earlier, all columns sort properly now. I guess this was broken back in May/June when the notes column was added. At any rate, I am committing this ASAP.
Re: List sorting (Notes etc.) [FIXED]

elliswr
MMEX Developer

Posts: 151
Joined: Tue May 05, 2009 2:21 am
Location: Granbury, TX
Committed Rev 680
Re: List sorting (Notes etc.) [FIXED]

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
I do not know why you spend your time on things which have already done in trunk. Sorting already totally rewritten in trunk. Your changes will remain in 0.9.5 forever. You and others people made a lot of commits in 0.9.5 and totally forget about trunk. Who will apply these changes to trunk??? Forget about 0.9.5, we should publish one AS IS as soon as possible. Concentrate your development efforts on MAIN TRUNK in svn.
Re: List sorting (Notes etc.) [FIXED]

Nikolay
MMEX Developer

Posts: 2284
Joined: Sat Dec 06, 2008 8:27 am
Location: Sankt-Petersburg, Russia
Vadim,

Absolutely agree with you.
But I am waiting when you'll finished the code refactoring.
My expirience is low, therefore I am afraid to breake something.
But I have patches for all my changes, where I can see what and where I have made.

OK I'll started to apply all my patches for trunk.
Re: List sorting (Notes etc.) [FIXED]

Vadim
MMEX Developer

Posts: 159
Joined: Mon Aug 03, 2009 1:35 am
Nikolay, the refactoring will take some months because I'm too busy and do not have enough free time. Surely, you can apply your changes later, but try to remember what you did in some revision after few days. So, if you commites something in branch, reply these changes immediately in trunk, and visa versa.

The right way to apply changes is "svn merge" command. But I afraid this command does not help in our case because the directories of branch and trunk diverges significantly. And you should review diff of your changes in trunk before commit them. Remember that many things in trunk already significantly reworked.
Page 1 of 1
Who is online

Users browsing this forum: No registered users and 13 guests