Emitting a signal leads to a failed assertion

I have a class (Gtk2::Ex::Geo::Overlay), which is a subclass of Gtk2::ScrolledWindow. I have connected the 'value-changed' signals of the scrollbars to a method of the Overlay class. In that method I want to emit a signal 'extent-changed' for the users of the Overlay widget to connect to. The code works ok, but Glib prints out a warning:

GLib-GObject-CRITICAL **: g_object_notify: assertion `G_IS_OBJECT (object)' failed

The system is a bit too large to create a test code quickly. The essentials are:

package Gtk2::Ex::Geo::Overlay;

use Glib::Object::Subclass
   signals => {
   extent_changed => {},

sub my_inits { # another question is why can't I do these in INIT_INSTANCE
my($self) = @_; my $hs = $self->get_hscrollbar();
   $hs->signal_connect("value-changed" => \&value_changed, $self);

sub value_changed {
   my($scrollbar, $self) = @_;
$self->{offset} = [$self->get_hadjustment()->value(), $self->get_vadjustment()->value()];
#causes a GLib-GObject-CRITICAL **: g_object_notify: assertion `G_IS_OBJECT (object)' failed
   return 1;

Best regards,


Prof. Ari Jolma
Geoinformaatio- ja paikannustekniikka / Geoinformation and positioning
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma

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