On Wed, Dec 30, 2009 at 1:20 PM, Albert Cervera i Areny
<[email protected]> wrote:
> A Dimecres, 30 de desembre de 2009, OvermindDL1 va escriure:
>> When I click the sorting column (my reason for choosing WTreeView) it
>> is doing a case sensitive ordering (as you can see on the member list
>> page on the http://overminddl1.no-ip.info:8030 still).  Looking
>> through the class API for WTreeView I do not see a method for setting
>> case-insensitive ordering on which columns, is there a way?  If not,
>> what would be the best way to implement it, subclass it?
>
> Haven't used it but I think you should look at WAbstractItemModel and co.

However, WStandardItemModel as used with the WTreeView only accepts
WStandardItem's, and the compare function that is called from
everywhere is both not virtual and is private so I could not do
anything with it anyway.  But the compare functions really only just
calls:
 return Wt::compare(d1, d2);
And since there is no icompare or anything, guess I will have to write
it. and just stick it all in operator< though that is not following
how the implementation works...

Implementation note, instead of Any in those cases, since you have to
specify exact types with that anyway, why not use Variant?  It is a
*lot* better for performance and you can stick in subclasses of things
that it supports.

I just reimplemented an icompare based on Wt::compare, but I notice
that it throws a WtException, but that header is not visible from my
app, why is that?  I am just having it through an std::exception
instead.  I still assert that Variant should be used though.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to