Re: builder on scalar properties
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: builder on scalar properties
- Date: Sat, 18 Sep 2010 18:16:34 +0200
On 12.09.2010 01:35, Kevin Ryde wrote:
If an object property is a Glib::Scalar, ie. Glib::ParamSpec->scalar,
can it be set with the<property> thingie in Gtk2::Builder ? The few
lines below get
Gtk-WARNING **: Failed to set property Foo.myscalar to "hello": Could not parse '"hello"' as a GPerlSV
at /tmp/scalar.pl line 21.
and apparently don't set the property.
This messages appears to originate from
gtk_builder_value_from_string_type in gtk/gtkbuilder.c. This function
seems to be responsible for converting the strings coming from XML to
actual values, and it only knows about the common value types. I don't
see any hooks to customize this process. Not even providing a
SET_BUILDABLE_PROPERTY override would be sufficient. I think you'd need
to have a custom tag for this, handled in a CUSTOM_TAG_START override.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]