Hello Fulvio, it is not that easy if I assume right that you want to have it starting from the game 20 of the sorted database. Then you need to sort the whole base first. This takes around 5 to 30 seconds for a large base. Is the user prepared to wait for this? So we need to discuss the usecases. Next question is how do you want to sort for comments first and elo as second criteria. What I have intended with the game list sorting is that the user sorts at the beginning of his session and then starts using the results. There a longer waiting time is acceptable and if he is using a tree lateron the games in the gamelist will always follow his sorting criteria. Gerd
----- Ursprüngliche Nachricht ----- Von: Fulvio Gesendet: 25.02.11 15:59 Uhr An: Gerd Lorscheid Betreff: Re: AW: [Scid-users] Sorting by variations patch Gerd Lorscheid wrote: > > I will continue to work on the dynamic sorting of the game list window, which > will > not change the database. > > May I ask for an interface like this? std::vector<int> Index::getGamelist (uint start, uint max_count, const Filter* filter = 0, const std::string& sort = "g+"); so that: db->idx->getGamelist(20, 10); returns 10 games starting from the 20th (ordered by game number. Ignoring filters) db->idx->getGamelist(20, 10, "W-"); returns 10 games starting from the 20th (ordered descending by White Elo. Ignoring filters) db->idx->getGamelist(20, 10, db->dbFilter, "y+"); returns 10 games starting from the 20th (ordered ascending by year. Only games in dbFilter will be considered) db->idx->getGamelist(20, 10, db->treeFilter, "i-"); returns 10 games starting from the 20th (ordered desc by "interest". Only games in treeFilter, i.e. that match the current position, will be considered) the result vector can be used like this: for (int i = 0; i < res.size(); i++) { IndexEntry* ie = db->idx->FetchEntry (res[i]); ie->PrintGameInfo (...); } Thanks, Fulvio
------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________ Scid-users mailing list Scid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scid-users