« Return to Thread: qx.ui.table.model.Simple.setSortMethods()

Re: qx.ui.table.model.Simple.setSortMethods()

by Derrell Lipman :: Rate this Message:

Reply to Author | View in Thread

On Mon, Jul 6, 2009 at 6:01 AM, Ian Horst <ian.horst@...> wrote:
Derrell,

I see your point. But let's take away from developers to define
descending function. Qooxdoo framework can figure it out itself. Less
code is better. :)

I don't have time to look at the backend of qooxdoo right now, but
instead of setSortMethods we could use

...setSortMethod: function (sortAscMethod)
{
 var sortDescMethod = function (row1, row2) {return
sortAscMethod(row2, row1);};
 var sortMethods = {ascending: sortAscMethod, descending: sortDescMethod};
 ...
}

Ian, that sounds like a great idea. I need to think about it some more to ensure there aren't cases where simply swapping the parameters wouldn't do the job, and it is an API change that should be well-considered. Would you please create an enhancement bug for this, including the issue you're trying to solve and your proposed solution. That way, this won't get forgotten. It's likely not to get into the upcoming release, but can still make it into 0.9 if we agree it's appropriate.

Derrell


------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@...
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

 « Return to Thread: qx.ui.table.model.Simple.setSortMethods()