Gtk.Builder.prototype.value_from_string_type

function value_from_string_type(type:GType, string:String):Boolean {
    // Gjs wrapper for gtk_builder_value_from_string_type()
}

Like Gtk.Builder.prototype.value_from_string, this function demarshals a value from a string, but takes a GLib.Type instead of GObject.ParamSpec. This function calls GObject.init on the value argument, so it need not be initialised beforehand.

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

Since 2.12

type

the GLib.Type of the value

string

the string representation of the value

Returns

true on success