Re: Creating bindings for GtkImageViewer



I added the following function to the xs code:

void
init(Class)
        CODE:
        {
                static int did_it = 0;
                if (did_it)
                        return;
                did_it = 1;
                GtkImageViewer_InstallTypedefs();
                GtkImageViewer_InstallObjects();
        }

and the initialization in test.pl :

        init Gtk::ImageViewer;

and I no longer get the error "unable to convert GtkObject..." but get
a new error:

        image = Gtk::ImageViewer=HASH(0x1f3918)
        variable is not of type Gtk::Widget at ./test.pl line 33.
        
from the following lines in test.pl :

        $image = Gtk::ImageViewer->new($pb);
        print "image = $image\n";
        $box->pack_start($image, 0, 1, 0);      # Line 33
        
where box is a Hbox created through Gtk::Widget->new("GtkHBox...") .

Of course $image isn't of type Gtk::Widget, but of a derived
type. What do I need to do to tell perl to do the casting?

--
                                                        ___   ___
                                                      /  o  \   o \
Dov Grobgeld                                         ( o  o  ) o   |
The Weizmann Institute of Science, Israel             \  o  /o  o /
"Where the tree of wisdom carries oranges"              | |   | |
                                                       _| |_ _| |_




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