Can't locate object method "motion_notify_event" via package "Gtk2::HRuler".



Hello,

In the Rulers example of the Gtk+ 2.0 tutorial, the 'motion_notify_event' of a DrawingArea widget is connected to the 'motion_notify_event' handler of an HRuler.

I'm trying to do the same thing in Gtk2-Perl like that:

#--------------------
my $area = Gtk2::DrawingArea->new;
$area->set_events([qw/pointer-motion-mask pointer-motion-hint-mask/]);

my $hrule = Gtk2::HRuler->new;
.
.
.
$area->signal_connect(motion_notify_event =>
                      sub { $hrule->motion_notify_event($_[1]); });
#--------------------

But a 'Can't locate object method "motion_notify_event" via package "Gtk2::HRuler"' error is generated.

Could you help me?

Kind regards,

csld.




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