Column model has only 1 column



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have a piece of code that looks like this:

   my %column_definition = ( "Date" => "text" );
   my $table = $gladexml->get_widget('treeEventOutput');
   my $simpleList = Gtk2::SimpleList->new_from_treeview ( $table,
%column_definition);

   foreach my $state (@states)
   {
      $table->append_column
(Gtk2::TreeViewColumn->new_with_attributes ($state,
Gtk2::CellRendererText->new, 'text', 0));
   }

I create a SimpleList initially with only one column, then I add an
arbitrary number of them afterwards.

When I go to add data into the columns using:

   if ($$record[0] =~ /FirstState/) { push @{$simpleList->{data}},
[$key, $$record[1], undef]; }

 I get,

   "can't set value for column 1, model only has 1 columns"

It looks like the SimpleList isn't seeing the new columns being added.
How do I convince the SimpleList to do what I want?

Thanks!

James
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDKlwK0hcObScku/YRAqDZAJ0XGqfTbxakgdsJ1rxrdvbndANkDwCghHKB
dLItK6LLth9AB1rfpiPrUTE=
=wfvM
-----END PGP SIGNATURE-----



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