Re: [gtk-list] Re: Another Perl/Gtk 0.6123 question



On Tue, Sep 14, 1999 at 01:38:28AM +0000, Dermot Musgrove wrote:
> > allow_grow doesn't exist as a method for GtkWindows, though.
> ------------------------------ This works:
>   $widgets->{'ReferenceForm'} = new Gtk::Window;
>   $widgets->{'ReferenceForm'}->allow_grow('1' );
[...]
> ------------------------------ But this doesn't work:
>   $widgets->{'BusFrame'} = new Gtk::Dialog;
>   $widgets->{'BusFrame'}->allow_grow('1' );

Ok, got it.
The problem is that allow_grow is not a method, per se, but an attribute
of Gtk::Window. We try to be smart and create settors/accessors at
runtime if you call something like $object->arg_name() or 
$object->arg_name($value), but this only works if $object is of the
same type the arg_name belongs to.
I din't catch this earlier because in the tests I called first 
$window->allow_grow() and then $dialog->allow_grow() and this works 
correctly.
Until the next release, as a workaround in the generated code you can use 
$dialog->set('allow_grow', 1);

Thanks for your bug reports.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules



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