could not find signal invocation hint



Hi,

I am trying to subclass a subclass of a Gnome2::Canvas::Group, and I can't get a method to call its parent method. I understand that SUPER:: is not available, but the online documentation baffles me and I'm getting the "could not find signal invocation hint" error. I've tried alot of things without success, even fiddling with the signal param_types. Here is my test case. I've made this case as small as I could get it.

package main;

use strict;
use Gtk2 '-init';
use Gnome2::Canvas;

my $window = Gtk2::Window->new();
my $scroller = Gtk2::ScrolledWindow->new();
my $canvas = Gnome2::Canvas->new_aa;

my $fruit = Gnome2::Canvas::Item->new($canvas->root,'Orange',x=>0, y=>0);

$fruit->ripen();

$canvas->set_scroll_region(0,0,350,325);
$scroller->add($canvas);
$window->signal_connect('destroy'=>sub { Gtk2->main_quit(); });
$window->set_default_size(450,350);
$window->add($scroller);
$window->show_all();

Gtk2->main();

exit 0;



package Fruit;

use strict;
use Gnome2::Canvas;

use POSIX qw(DBL_MAX INT_MAX);

use Glib ':constants';

use Glib::Object::Subclass
   Gnome2::Canvas::Group::,

   properties => [
          Glib::ParamSpec->string ('color', 'colour', 'Color of fruit',
                       'green', G_PARAM_READWRITE),
          ]
   ;


sub ripen
{
   my $self = shift(@_);

   my $ellipse = Gnome2::Canvas::Item->new($self,'Gnome2::Canvas::Ellipse',
                       x1=>10, y1=>10,
                       x2=>50, y2=>50,
                       fill_color=>$self->get('color'));
}



package Orange;

use strict;
use Gnome2::Canvas;

use POSIX qw(DBL_MAX INT_MAX);

use Glib ':constants';

use Glib::Object::Subclass
 Fruit::,
 #  Unsure how to fiddle with the signals in this case. ???
   signals=>{
      event => \&ripen,

   },

   properties => [
          ]
   ;


sub ripen
{
   my $self = shift(@_);

   my $rect = Gnome2::Canvas::Item->new($self,'Gnome2::Canvas::Rect',
                       x1=>110, y1=>110,
                       x2=>150, y2=>150,
                       fill_color=>$self->get('color'));

   $self->signal_chain_from_overridden; # Produces the error.
}




1;


No doubt it's something dumb that I've overlooked. Any help appreciated.

-James




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