From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2009-02-06 15:23:27
|
If you have any questions why you received this email, please see the text at the end of this email. Replies to this email are NOT read, please see the text at the end of this email. You can add comments to this bug at: http://bugzilla.gnome.org/show_bug.cgi?id=570792 gnome-perl | Glib | Ver: unspecified Summary: Support interface properties when subclassing Product: gnome-perl Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: enhancement Priority: Normal Component: Glib AssignedTo: gtk...@li... ReportedBy: kaf...@gm... QAContact: gtk...@li... GNOME version: Unspecified GNOME milestone: Unspecified When subclasses want to implement an interface that contains properties[1], there appear to be two options[2]: • add new properties with matching names; or • use g_object_class_override_property. I think Glib::Type->register should use the second approach when it encounters a subclass which wants to implement an interface with a property and which doesn't have its own property with the same name. This means that Perl subclasses implementing some interface will get calls to their [GS]ET_PROPERTY for these properties automatically. When a subclass is registered which implements some interface with properties but doesn't override one of the properties, a critical warning is printed: GLib-GObject-CRITICAL **: Object class Switchable doesn't implement property 'orientation' from interface 'GtkOrientable' In gtk+, there appear to be four interfaces with properties: GtkActivatable, GtkFileChooser, GtkOrientable, and GtkRecentChooser. [1] <http://library.gnome.org/devel/gobject/2.19/howto-interface-properties.html> [2] <http://library.gnome.org/devel/gobject/2.19/gobject-The-Base-Object-Type.html#g-object-interface-install-property> -- See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received this email, why you can't respond via email, how to stop receiving emails (or reduce the number you receive), and how to contact someone if you are having problems with the system. You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=570792. |