I'm new using Julia + Gtk and I'm trying to create a simple window with a button that closes the window. The following code creates the window and the button, and everything seems to work fine, but when I press the button the window does not close and the program stop responding, forcing me to kill Julia REPL. No error message appears in the REPL.
using Gtk
win = GtkWindow("Main", 100,50)
button = GtkButton("Exit")
push!(win,button)
showall(win)
signal_connect(button, :clicked) do widget
println("Exit")
Gtk.gtk_quit()
end
UPDATE:
The problem seems to be in the function gtk_quit() in /src/events.js:
function gtk_quit()
ccall((:gtk_main_quit, libgtk), Void, ())
end
If I replace Gtk.gtk_quit() with ccall((:gtk_main_quit, libgtk), Void, ()) in my code I get "ERROR: UndefVarError: libgtk not defined" in the REPL .
I would appreciate if someone can suggest what is wrong here.