Re: Tutorial code converted to Perl



>>>>> "KA" == Kenneth Albanowski <kjahds@kjahds.com> writes:

KA> Which is rather silly, that'll be fixed so it is:

KA>   $style = Gtk::Widget->get_default_style;

Actually that does work.  I'm not quite sure why I didn't try it before.

KA> Should be as simple as:

KA>    $window->shape_combine_mask($mask, 0, 0);

That definitely bombs; I built out of CVS yesterday but I just updated and
am building again.  Done, no change.  It seems (given my limited
understanding) that shape_combine_mask is a Gtk::Gdk::Window method instead
of a Gtk::Window method, leading to this error with the code you give:

Can't locate object method "shape_combine_mask" via package "Gtk::Window"
at ./s7.5-2 line 151.

Attempting to override the package with something nasty like:

$window->Gtk::Gdk::Window::shape_combine_mask($mask, 0, 0);

gives the puzzling

variable is not of type Gtk::Gdk::Pixmap at ./s7.5-2 line 151.

KA> For those errors to occur, either the window or mask is probably
KA> broken. Which probably means some earlier lines have croaked.

Well, if I remove the line altogether I get the expected result: the pixmap
shows up but on a square grey undecorated window.  So the window and the
mask should be fine, because the pixmap is created and displays OK.

 - J<



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