On 02/10/2010, Mike Martin <redt...@gmail.com> wrote:
> I think we may have crossed as that is more or less what I have done
>

$cat_rend->signal_connect('changed'=>sub{
my $rend_iter=$_[2]; # iter of selected item
$valid=$cat_rend->get("model")->get_value($rend_iter,0);
}
);
$cat_rend->signal_connect('edited'=>sub{
                        my $id=$row_ref->[1];
                        my ($cell, $text_path, $val) = @_;
print $valid,"\t",$val,"\n";#$valid is column 0, $val is column1
                                        $modeltable->set (
                                                
$modeltable->get_iter_from_string ($text_path),
                                                5, $val
                        );
#                       $dbh->do("update titles set category='$val' where 
id='$id'");
                        }
                        );


> On 02/10/2010, Tadej Borovšak <tadeb...@gmail.com> wrote:
>> Hi.
>>
>> There is no such thing as "currently active iter" when it comes to
>> GtkCellRendererCombo. Cell renderers do not retain any permanent state
>> as they render more than one cell.
>>
>> Another approach would be to connect to GtkCellRendererCombo::changed
>> signal and store selected path into main model.
>>
>> 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

Reply via email to