Gtk.Builder.prototype.add_objects_from_string
function add_objects_from_string(buffer:String, length:gsize, object_ids:[String]):Number {
// Gjs wrapper for gtk_builder_add_objects_from_string()
}Parses a string containing a <link linkend="BUILDER-UI">GtkBuilder UI definition</link> building only the requested objects and merges them with the current contents of builder.
Upon errors 0 will be returned and @error will be assigned a GLib.Error from the #GTK_BUILDER_ERROR or #G_MARKUP_ERROR domain.
<note><para> If you are adding an object that depends on an object that is not its child (for instance a Gtk.TreeView that depends on its Gtk.TreeModel), you have to explicitely list all of them in object_ids. </para></note>
Since 2.14
- buffer
the string to parse
- length
the length of buffer (may be -1 if buffer is nul-terminated)
- object_ids
nul-terminated array of objects to build
- Returns
A positive value on success, 0 if an error occurred