[xs] Bug with GtkAllocation->width



Hi,

I think I found a bug in gtk-perl-xs regarding GtkAllocation. I have a 
small module which can track allocations of selected widgets to apply 
some layout optimizations (e.g. giving cells of independent tables the 
same width). It connects "size-allocate". The callback gets a 
GtkAllocation object. Calling ->width on this object produces an error:

  $widget->signal_connect("size-allocate", sub {
    my ($widget, $alloc) = @_;
    print "width=".$alloc->width;
    1;
  });

gives

  Not an ARRAY reference at .../Gtk2.pm line 127.

There is some confusion with GtkAllocation and GdkRectangle I don't 
really understand, but obviously the ->width method defined in line 127
expects a GdkRectangle object (which is a blessed array reference), but
in my case it's called on a GtkAllocation object (which is a blessed 
scalar reference).

Regards,

Joern

-- 
Joern Reder
Development Head ZYN! Coding Division - http://www.zyn.de/




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