deafSortBlock for ListView

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

deafSortBlock for ListView

Howard Oh
Guys,

ListViewColumns make walkbacks when they are clicked without proper
definition of #sortBlock:. This is forcing us to define sortBlocks to
maintain mild GUI.

I usually don't need sortings for default columns.(This may differ for
personality). I want to propose that we make the ListViewColumn silent as
far as we define a block for it.
(Think about how easy we are for DeafObject as a View)
My version of default sortBlock is
[ <a sorting test expression> ] on: Error do: [:e| true].

Do you agree?

Hwa Jong Oh


Reply | Threaded
Open this post in threaded view
|

Re: deafSortBlock for ListView

Ian Bartholomew-3
Hwa Jong Oh,

> My version of default sortBlock is
> [ <a sorting test expression> ] on: Error do: [:e| true].
>
> Do you agree?

Not really. Ignoring errors is OK as long as you have made a deliberate
decision to do it but having it as a default is a bit dangerous, IMHO.

There are other ways to prevent the problem though. Defining a #<= method in
the class of the objects that appear in the list will prevent the walkbacks.
If you don't want any sorting to be available, or the list classes are
unsortable, then turning it off completely by setting #hasSortHeaders to
false would seem to be the most user friendly way of proceeding (I have
occasionally wondered if that might not be a better default for Dolphin
ListViews).

Ian