Storing TreeRowReference in a tree



Hi,

I have the following problem.

I'm using two Gtk2::TreeStores and storing references between those in
a column in one treestore. I get the following error:

"***   Can't locate object method "get_path" via package
"Gtk2::TreeRowReference=SCALAR(0x975aa58)" (perhaps you forgot to load
"Gtk2::TreeRowReference=SCALAR(0x975aa58)"?) "

when getting a row reference from the store and trying to get a path
out of that. I'm using the following code to get the reference from
store. How should I store the references so that they stay correct
even though the trees are edited?

# Go through all the blocks connections and delete those also
       my $numberOfChildren = $treemodel->iter_n_children($iter);
       for (my $i = $numberOfChildren - 1; $i >= 0; $i--){
               my $iter_child =  $treemodel->iter_nth_child($iter,$i);
               my $connectionRef = $treemodel->get($iter_child,3);
               my $connectionPath = $connectionRef->get_path();
               my $connectionIter = $treemodel->get_iter($connectionPath);
               $self->signalTreestore->remove($connectionIter) if
defined $connectionIter;
       }


The reference seems to be fine when stored to the treestore by the
following code:

$iter_child = $treemodel->append($iter);
 my $signalRef =
add_connection_to_signal($self,$blockName,$signalName,$i,$blockRef);
 carp("SIGREF ".$signalRef->get_path) if $debug;
 $treemodel->set($iter_child,0 => "IN".$i,2 => $signalName, 3 => $signalRef);

Have a Nice Weekend!

--Jouko
--
Jouko Salo
jouko salo gmail com



-- 
Jouko Salo
Puh: 040-5262122
jouko salo utu fi



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