Re: [BUG] Gtk2::Plug does not accept calls to set_transient_for()method due to typechecking system bug
- From: "muppet" <scott asofyet org>
- To: gtk-perl-list gnome org
- Subject: Re: [BUG] Gtk2::Plug does not accept calls to set_transient_for()method due to typechecking system bug
- Date: Mon, 18 Aug 2003 10:26:15 -0400 (EDT)
Thierry Vignaud said:
$Plug->set_transient_for(Gtk2::Gdk::Window->foreign_new($::XID));
...
variable is not of type Gtk2::Window at /usr/lib/libDrakX/ugtk2.pm
...
however Gtk2::Plug inherit from Gtk2::Window and thus should support
set_transient_for() method.
yes, but you're sending it a Gtk2::Gdk::Window, not a Gtk2::Window. :-)
try instead
$plug->window->set_transient_for (Gtk2::Gdk::Window->foreign_new($::XID));
but the typechecking system only check for a Window not for a polymorphic
Window like it should do.
actually, it does check for that --- see gperl_get_object_check() in
Glib/GObject.xs, which essentially says:
package = gperl_ojbect_package_from_type (gtype);
if (sv is invalid or not sv_derived_from (sv, package))
croak()
sv_derived_from is XS-ese for 'isa'.
--
muppet <scott at asofyet dot org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]