Hello Everyone,
I am creating my first GUI and got stuck. I defined the GUI in xml format and then used GTK4 and the GtkBuilder in the Julia code. The window appears with no problem. I just can’t figure out how to change the list of options in the dropdown menu after the widget is created. The example in the tutorial does not seem to work. Can’t link it properly due to julia site error:
(https://docs.juliahub.com/Gtk4/rFcBQ/0.7.3/manual/combobox/
)
Here is the MWE of my program:
using Gtk4
b = GtkBuilder("ui.xml")
win = b["window"]
show(win)
reactor=("1")
reactor_ddm = b["reactor_dd"]
push!(Gtk4.model(reactor_ddm), reactor)
if !isinteractive()
@async Gtk4.GLib.glib_main()
Gtk4.GLib.waitforsignal(win,:close_request)
end
This is the error I get:
ERROR: LoadError: MethodError: no method matching push!(::Nothing, ::String)
The functionpush!
exists, but no method is defined for this combination of argument types.Closest candidates are:
push!(::Any, ::Any, ::Any)
@ Base abstractarray.jl:3529
push!(::Any, ::Any, ::Any, ::Any…)
@ Base abstractarray.jl:3530
push!(::Base.Nowhere, ::Any)
@ Base array.jl:1821
…
Thanks in advance for the help!