Two SimpleLists with one data stucture



Hi, everybody,
I've been trying to build an application which has a SimpleList
with 4 columns. and its 4th column (invisible) is supposed to contain
some data shown and controlled by another SimpleList.


Here's how I did it:

###
my $sl1 = new Gtk2::SimpleList (
        'Number'        =>'int',
        'Function'      =>'text',
        'Default'       =>'int',
        'Subvalues'     => 'scalar',
);
push @{$sl1->{data}},[1,"Pan",128,[]]; #one row for example

my $sl2 = new Gtk2::SimpleList (
        'Value'         =>'int',
        'Midpoint'      =>'int',
        'Decsription'   =>'text',
);

$sl1 -> signal_connect (row_activated => sub {
                my ($sl, $path, $column) = @_;
                my $row_ref = $sl->get_row_data_from_path ($path);
                $sl2 -> set_data_array ($r->[3]);
});
###

Doesn't work :(
Please, tell me what is wrong.
Thanks in advance...

Vassily


-- 
Исходники не горят...



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