Re: [gtk-list] Re: Perl-Gtk basic problems



Luis Felipe Piccolini Marull wrote:
> 
[...]
>         Thanks Dermont for all your help. But ( I'm starting to think I'm
> stupid or something, or simply I don't know nothing about perl-gtk or just
> perl) 
Hi again, it will all become clear soon.

> trying to doit this error sends to me when I push the button to run
> the sub:
> 
> Can't call method "append" without a package or object reference at
> src/SubProject2.pm line 121.
This error means that $form->->{'list_1_lista_amigos'} is not a ref to a
CList widget. There could be several reasons:

1) You have misspelled the widget name. Check in Glade or the generated 
.pm file that you have the correct name.

2) The widget exists but it is not a Gtk::CList.

3) The Gtk::CList is not on the same form/dialog as the button. If this is
the case, you will have to do what I suggested in my very first email and
create the form first and then refer to the widget on that form by doing:
    my $new_form = new OtherForm;
    $new_form->TOPLEVEL->show;
    $new_form->FORM->{'list_1_lista_amigos'}->append('hola', 'col2', 'col3');

HTH, Dermot



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