Re: [gtk-list] Perl/Gtk CVS 19990922



On Sun, Sep 26, 1999 at 02:41:34AM +0000, Dermot Musgrove wrote:
> $gtk_colorselectiondialog_ok_button->child()? throws error:
> 
> Gtk-WARNING **: gtk_object_arg_get(): argument "GtkContainer::child" is 
> not readable
> Can't locate object method "child" via package "Gtk::Widget" at ...
> 
> The only difference that I can see between Gtk::ColorSelectionDialog and
> for instance Gtk::FontSelectionDialog that can call ->child() is that 
> 
> GtkColorSelectionDialog.xs binds 
> 
> Gtk::Widget
> ok_button(csdialog)
>         Gtk::ColorSelectionDialog       csdialog
>         CODE:
>         RETVAL = csdialog->ok_button;
>         OUTPUT:
>         RETVAL
[...]
> Is the 'Up' in the cast important? 

Yes, that is it: Gtk::Widget_Up 'upgrades' the pointer to the correct
class.

> BTW I am trying to set_text of the buttons' labels.

This may be dangerous: check that the child is actually a Gtk::Label
before using set_text on it.

> PS I am getting 'Abort (core dumped)' on exit again. I have changed a load
> of code so it may well be my fault but has anyone else noticed this?

Well, you shouldn't be getting a core dump using Perl/Gtk: provide a test
case so we can check what's wrong.

lupus



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