Problem with Gtk2::Deprecated v0.03

I understand that Gtk2::Deprecated is not well supported, and should not be used, however...

I am trying to port a set of Gtk applications to Gtk2 incrementally and I would like applying Gtk2::Deprecated to a few method calls. I noticed that I am having certain problems when using the Gtk2::CList::set_row_data method call.

I get the following error:

Gtk2::CList is deprecated, use Gtk2::ListStore and Gtk2::TreeView instead at line 25.
Bizarre copy of ARRAY in entersub at line 41.

when I try out the following program.(please see below).

I was wondering if I am using the CList::set_row_data method properly or if I have written this test improperly or if there is some other error that I am not aware of ?

Thanks in advance.




require 5.8.0;

use constant TRUE  => 1;
use constant FALSE => 0;

use Gtk2;
use Gtk2::Deprecated;

Gtk2->set_locale();    # internationalization
Gtk2->init();          # initialization

my $dialog = Gtk2::Window->new('toplevel');
$dialog->set_title("Gtk2::Deprecated Test");
$dialog->signal_connect("delete_event", sub { Gtk2->main_quit(); } );

my $vbox = Gtk2::VBox->new(FALSE,FALSE);

my $scrolled = Gtk2::ScrolledWindow->new();

my @headers = ('a', 'b', 'c');
my $clist = Gtk2::CList->new_with_titles(@headers);


# Autoset the column widths
foreach my $col (0..$clist->columns) {
   $clist->set_column_auto_resize($col, TRUE);


my @data = ( [1, 2, 3], [4, 5, 6], [7, 8, 9] );

for my $rowdata (@data) {
   my $rowindex = $clist->append(@$rowdata);




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