Julia Gtk GtkBuilder: GtkBuilder(buffer=astring) error

103 Views Asked by At

I'm running the following code snippet on Windows:

root = Base.source_dir()
s = read(joinpath(root,"dialog.glade"), String)
# b = GtkBuilder(filename=joinpath(root, "dialog.glade")) # works fine
b = GtkBuilder(buffer=s) # error
...get objects, etc

I'm getting the following:

LoadError: Error on line 77 char 2: Document must begin with an element (e.g. <book>)

What am I doing wrong?

Minimal glade file that reproduces the fault:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
  <requires lib="gtk+" version="3.24"/>
  <object class="GtkDialog" id="win">
  </object>
</interface>

This has 8 lines, the last being an empty line. The reported error is at line 8 char 2.

0

There are 0 best solutions below