fpath = joinpath(Base.source_dir(), "dialog2.glade")
s = read(fpath, String)
b = GtkBuilder(buffer = s) # ERROR
b = GtkBuilder(filename = fpath) # works fine
In which "dialog2.glade" consists of minimal code as follows:
"
ERROR: LoadError: Error on line 8 char 2: Document must begin with an element (e.g. )
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] Gtk.GLib.GError(f::Gtk.var"#304#307"{String, Gtk.GtkBuilderLeaf})
@ Gtk.GLib C:\Users\Daddy.julia\packages\Gtk\B6LVT\src\GLib\gerror.jl:17
[3] #push!#303
@ C:\Users\Daddy.julia\packages\Gtk\B6LVT\src\builder.jl:13 [inlined]
[4] Gtk.GtkBuilderLeaf(; buffer::String, filename::Nothing, resource::Nothing)
@ Gtk C:\Users\Daddy.julia\packages\Gtk\B6LVT\src\builder.jl:4
[5] #GtkBuilder#64
@ C:\Users\Daddy.julia\packages\Gtk\B6LVT\src\GLib\gtype.jl:226 [inlined]
[6] top-level scope
@ d:\My Documents\JULIA\Packages 1.X\ImageDialog\src\ImageDialog.jl:31
On Windows 11, very latest Gtk3, VSCode
fpath = joinpath(Base.source_dir(), "dialog2.glade") s = read(fpath, String) b = GtkBuilder(buffer = s) # ERROR b = GtkBuilder(filename = fpath) # works fine
In which "dialog2.glade" consists of minimal code as follows:
ERROR: LoadError: Error on line 8 char 2: Document must begin with an element (e.g.)
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] Gtk.GLib.GError(f::Gtk.var"#304#307"{String, Gtk.GtkBuilderLeaf})
@ Gtk.GLib C:\Users\Daddy.julia\packages\Gtk\B6LVT\src\GLib\gerror.jl:17
[3] #push!#303
@ C:\Users\Daddy.julia\packages\Gtk\B6LVT\src\builder.jl:13 [inlined]
[4] Gtk.GtkBuilderLeaf(; buffer::String, filename::Nothing, resource::Nothing)
@ Gtk C:\Users\Daddy.julia\packages\Gtk\B6LVT\src\builder.jl:4
[5] #GtkBuilder#64
@ C:\Users\Daddy.julia\packages\Gtk\B6LVT\src\GLib\gtype.jl:226 [inlined]
[6] top-level scope
@ d:\My Documents\JULIA\Packages 1.X\ImageDialog\src\ImageDialog.jl:31