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

From: Dermot Musgrove <dermot glade perl connectfree co uk>

To: "gtk-list redhat com" <gtk-list redhat com>

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

Date: Mon, 08 Nov 1999 02:29:21 +0000

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