I am trying to use Julia with the Gtk package outside the REPL.
Using this code:
Using Gtk.ShortNames
win = @Window("My Window")
in the REPL works, but the same code put in a test.jl file and using:
julia test.jl
in the command line does not work.
I have tried the method written here: https://github.com/JuliaLang/Gtk.jl
Using Gtk.ShortNames
win = @Window("gtkwait")
# Put your GUI code here
if !isinteractive()
c = Condition()
signal_connect(win, :destroy) do widget
notify(c)
end
wait(c)
end
The code runs but no window appears.
If it's any help, I'm on Manjaro Linux with 4.1 Linux Kernel and have both GTK2 and GTK3 librairies installed.
showall()
(which I think is the equivalent togtk_widge_show_all()
) on the window to show it. This is what happens with normal GTK+. – andlabs