Re: Question about Treeview/SimpleList



Jaap Karssenberg said:
It does what I want, except for a bunch of errors:
  Gtk-WARNING **: Attempting to sort on invalid type GPerlSV

All my columns are defined with ctype 'scalar' since it is dynamic data.
When I tested it with columns of types 'text' and 'int' it worked
without errors.

"dynamic data"?  you can change the values of string and int columns, so you
really only need scalar columns to store complex data structures (a hash
containing the extra data for a row, for example).

you should be able to supply a sort func to sort your scalar columns, by
calling $model->set_sort_func with the appropriate sort_column_id:
http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeSortable.html#gtk-tree-sortable-set-sort-func


An other strange error appeared when I by tried to use ctype 'string':
  unknown column type string, use one of scalar, double, bool, int,
                      ^^^^^^
  text, string, hidden, pixbuf at test.pl line 35
        ^^^^^^

eh?  i don't see a column type named string in the %column_types array in
SimpleList.pm, so that error message shouldn't include that.  does your file
have something different?


-- 
muppet <scott at asofyet dot org>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]