Gtk.Builder.prototype.value_from_string

function value_from_string(pspec:GObject.ParamSpec, string:String):Boolean {
    // Gjs wrapper for gtk_builder_value_from_string()
}

This function demarshals a value from a string. This function calls GObject.init on the value argument, so it need not be initialised beforehand.

This function can handle char, uchar, boolean, int, uint, long, ulong, enum, flags, float, double, string, Gdk.Color, Gdk.RGBA and Gtk.Adjustment type values. Support for Gtk.Widget type values is still to come.

Upon errors false will be returned and @error will be assigned a GLib.Error from the #GTK_BUILDER_ERROR domain.

Since 2.12

pspec

the GObject.ParamSpec for the property

string

the string representation of the value

Returns

true on success