On Aug 23, 2005, at 7:27 AM, Jens Luedicke wrote:
muppet wrote:Sure you can. See attached example, modelmodelmodel.pl... a sortedand filtered list. That's probably a rather heavyweight way to do it,but it is at least possible.it doesn't work if you try to use a custom sort compare function.TreeModelSort passes the underlying TreeModelFilter model to the comparefunction. which doesn't provide the get_sort_column_id method. my $sort_func = sub { my ($model,$a,$b) = @_; my ($sort_column_id,$order) = $model->get_sort_column_id;
That just means you wind up with tight coupling because of having to do things like
my ($sort_column_id, $order) = $model->get_child_model- >get_sort_column_id;
(or is that just "get_model"?) I didn't say it was "great", just "possible". ;-) -- Without treatment, a common cold will last about seven days. With treatment, it will last about a week. -- conventional wisdom