I’m trying the sketch.jl example from the Tk.jl package:
On OS X this gives a drawing canvas that is only updated when I switch windows, i.e., force the drawing to be updated. When I add an explicit Tk.update() after line 27, I get spurious lines in the drawing:
Anyone knows how to solve this? Is this also a reported issue on linux?
I’m a gtk user and apart from some BinDeps problems quite satisfied. Recently we had this GUI thread: Julia for GUI app with other ideas for GUI implementations.
Yes, but on the other hand you get clean separation between GUI (the QML) and data (just the Point here). The QML file, which is the longest, could easily be generated using a GUI designer such as Qt Creator.
I’m not seriously (SCNR-> sorry, could not resist…) comparing the efficiency of different UI toolkits. We see convergence here: Similar code for similar problems.
btw: about the code and GUI split: GtkBuilder exists and you can do an xml desciption of a GUI or build it with glade and run it or change it dynamically. Convergence again.
in the gist example to get fwindow2.glade working.
gui1.glade gave an error:
ERROR: LoadError: gui1.glade:247:1 Invalid object type 'EMC_ToggleAction_ESTOP'
in Gtk.GLib.GError(::Gtk.##181#184{String,Gtk.GtkBuilderLeaf}) at /home/kjwiik/.julia/v0.5/Gtk/src/GLib/gerror.jl:17
in #push!#179(::Void, ::String, ::Void, ::Function, ::Gtk.GtkBuilderLeaf) at /home/kjwiik/.julia/v0.5/Gtk/src/builder.jl:20
in (::Base.#kw##push!)(::Array{Any,1}, ::Base.#push!, ::Gtk.GtkBuilderLeaf) at ./<missing>:0
in #GtkBuilderLeaf#178(::Void, ::String, ::Void, ::Type{T}) at /home/kjwiik/.julia/v0.5/Gtk/src/builder.jl:4
in (::Core.#kw#Type)(::Array{Any,1}, ::Type{Gtk.GtkBuilderLeaf}) at ./<missing>:0
in include_from_node1(::String) at ./loading.jl:488
in process_options(::Base.JLOptions) at ./client.jl:262
in _start() at ./client.jl:318
Maybe something has changed after the example was written.
i think this was (see gist 3 years ago) pre-v0.4 and for sure something is different since then. @tknopp is known to be a glade/GtkBuilder user; Do you have a more recent working example?
Yes indeed one should try to ensure using Gtk3 widgets. Gtk.jl itself has some support for Gtk2 but it is far from complete and in my opinion not advisable to use Gtk2 anymore.