integer = $tree_model->*iter_n_children* ($iter=undef) -
$iter (Gtk2::TreeIter or undef) Returns the number of children *$iter* has. If *$iter* is undef (or omitted) then returns the number of toplevel nodes. with $list_store->iter_n_children(undef) you will know if is empty or not and the rows that it has throug a integer value. The way of tadej showed is correct too. David. On Mon, Jul 27, 2009 at 1:49 PM, Tadej Borovšak <tadeb...@gmail.com> wrote: > Hi. > > I would use construct like this one: > > --- CODE --- > my $iter = $list_store->get_iter_first; > if( $iter ) > # Get contents of first line > my @line = $list_store->get( $iter ); > else > # Add new line > > --- CODE --- > > This might not be the best way, but it should work. > > Tadej > > -- > Tadej Borovšak > tadeboro.blogspot.com > tadeb...@gmail.com > tadej.borov...@gmail.com > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list >
_______________________________________________ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list