Re: GtkOrientable vs property "override"
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: GtkOrientable vs property "override"
- Date: Thu, 12 Feb 2009 10:08:25 +0100
Kevin Ryde wrote:
Is the GtkOrientable bit about making a property "override" still
pending?
Yes, I committed Emmanuel's patch without the _ADD_INTERFACE xsub. So any
attempt to implement Gtk2::Orientable in a subclass will fail[1]. The bug
entries are <http://bugzilla.gnome.org/show_bug.cgi?id=570792> and
<http://bugzilla.gnome.org/show_bug.cgi?id=570793>.
Coming to understand it very very slowly ... is it about making
g_object_class_override_property() available so a perl-code widget can
create itself a property which takes the pspec of the GtkOrientable?
Yes. The basic open question is when do we want
g_object_class_override_property() to happen. Do we want it to happen
automatically whenever a subclass is registered that implements Gtk2::Orientable
but which doesn't have its own "orientation" property? That is, do we want
use Glib::Object::Subclass
Parent::,
interfaces => [ Gtk2::Orientable:: ];
to call g_object_class_override_property() for "orientation"?
Or do we want to make the programmer actively ask for the property override,
using a new syntax?
use Glib::Object::Subclass
Parent::,
properties => [ "orientation" ], # override for Gtk2::Orientable
interfaces => [ Gtk2::Orientable:: ];
The first approach should be easy to implement and doesn't need new syntax, but
it is rather automatic. It would mean that [GS]ET_PROPERTY were called for
properties ("orientation" in the example) that the programmer didn't mention at all.
[1] With an obscure error message about _ADD_INTERFACE not being found. We
should try to provide better diagnostics.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]