problems with liststore....



Hello!

again running mad with some stupid problems...

i have a splitted screen, hitting on one of the left parts should
trigger the display of the asociated info on the right part...

as long as i use spinbuttons, entries etc all is fine...

but some options come in as a list, so i tought setting them up with a
TreeView...

which meant i had to set up a model...

now the problem:

i need to clear the model when a new request comes in and then fill it
up with the new data...

(BTW if someone could point me out to the docu for that stuff...
 ListStore deosn't seem to exist in C, nor is there some perldoc docu)

tryed the following:

      my @newdata = split(/,/,$value);
      my $model =  $widget->{"data_"};
      my $iter = $model->get_iter_first();
      while($iter && $iter != 1)
      { 
        $model->remove($iter);
        $iter = $model->iter_next($iter);
      }# while($iter = $model->remove($iter))

      foreach my $item (@newdata)
      {
        $iter = $model->append;
        $model->set($iter,0,$item);
      }# foreach my $item (@{$field->{"default"}})

and get a:

Gtk-CRITICAL **: file gtkliststore.c: line 589 (gtk_list_store_iter_next):
assertion `GTK_LIST_STORE (tree_model)->stamp == iter->stamp' failed at
./saveEditor.pl line 618.

plus even if i remove the deleting part, i get an empty list on screen,
  even if the thing claims filling it...

if anyone has a hint... i take it gladly!


-- 
ciao bboett
==============================================================
bboett adlp org
http://inforezo.u-strasbg.fr/~bboett
===============================================================



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