Re: buildable vs plain objects
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Cc: muppet <scott asofyet org>
- Subject: Re: buildable vs plain objects
- Date: Sat, 18 Sep 2010 18:34:32 +0200
On 12.09.2010 01:27, Kevin Ryde wrote:
The Gtk2::Buildable pod "PLAIN OBJECTS" reads like you can't build a
plain Glib::Object subclass at all unless you have the Gtk2::Buildable
interface on it. I suppose that's adapted from the gtk ref manual
GtkBuildable "Description",
In order to allow construction from a GtkBuilder UI description, an
object class must implement the GtkBuildable interface.
But is it true? The few lines below seem to work for me (gtk 2.20).
Gtk2::Builder seems fine on plain objects, at least as far as creating
and<property> settings.
I think you're right. GtkBuilder simply calls g_type_from_name to map a
class name to a GType and then uses glib's built-in introspection
mechanisms to construct the thing. Implementing GtkBuildable is only
necessary if you want to customize the construction, I think.
Are we missing something, muppet?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]