TableReport and sortBlock

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

TableReport and sortBlock

HilaireFernandes
Hello,

I have a hard time to use the sortBlock: option with TableRerport.

Nothing happens when clicking on the column title.
I am using like this:

(table := reports add: WATableReport new)
   rows: self amounts;
   columns: (OrderedCollection new
      add: ((WAReportColumn selector: #amount title: 'Montant')
sortBlock: [:d1 :d2 | d1 amount >= d2 amount]);
      yourself.
[..]

Moreover, if I had a halt in the sortBlock, it looks like the sort block
is never executed.

Do I miss something?

Thanks

Hilaire

--
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: TableReport and sortBlock

HilaireFernandes
Oops, my bad. I was defining the report in the render method, so the
sort preferences were reset at each refresh.

Hilaire

Le 03/06/2015 15:00, Hilaire a écrit :

> Hello,
>
> I have a hard time to use the sortBlock: option with TableRerport.
>
> Nothing happens when clicking on the column title.
> I am using like this:
>
> (table := reports add: WATableReport new)
>    rows: self amounts;
>    columns: (OrderedCollection new
>       add: ((WAReportColumn selector: #amount title: 'Montant')
> sortBlock: [:d1 :d2 | d1 amount >= d2 amount]);
>       yourself.
> [..]
>
> Moreover, if I had a halt in the sortBlock, it looks like the sort block
> is never executed.
>
> Do I miss something?
>
> Thanks
>
> Hilaire
>


--
Dr. Geo
http://drgeo.eu
http://google.com/+DrgeoEu

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside