interactive search on simplelist



Hi
I am trying to implement an interactive search on a SimpleList, by doing
the following:

 my $addskulist = Gtk2::SimpleList->new(
                                  'SKU Code' => 'text',
                                  'Description' => 'text');
    $addskulist->get_selection->set_mode('multiple');

    $addskulist->set_enable_search($true);
    my $col = $addskulist->get_column(0);
    $addskulist->set_search_column($col);


When I press Ctrl - f, I get the search box, but on typing anything in
the box, it immediately moves the selection to the first item in the
list, and throws out the following error - 

Gtk-CRITICAL **: file gtkliststore.c: line 565
(gtk_list_store_get_value): assertion `column < GTK_LIST_STORE
(tree_model)->n_columns' failed at
/home/gdsword/sword/stock/stk_bom_edit.pl line 738.
GLib-GObject-CRITICAL **: file gvalue.c: line 326 (g_value_transform):
assertion `G_IS_VALUE (src_value)' failed at
/home/gdsword/sword/stock/stk_bom_edit.pl line 738.
GLib-GObject-CRITICAL **: file gvalue.c: line 147 (g_value_unset):
assertion `G_IS_VALUE (value)' failed at
/home/gdsword/sword/stock/stk_bom_edit.pl line 738.

I know I will have done something stupid again here, but I don't know
enough to figure out exactly what :-(.    If anyone can give me a couple
of pointers I would be very grateful.

Thanks

 
-- 

Regards


David Sword




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