diff --git a/src/gui.jl b/src/gui.jl index c96952931dc007dbce09eb57b0ebf64b8596b0b3..841692913d9ec107913704f4aa4910c02329909a 100644 --- a/src/gui.jl +++ b/src/gui.jl @@ -8,7 +8,8 @@ wc[:foo] """ mutable struct Widget_Container #Widgets with symbols - widgets::Array{WebIO.Node{WebIO.DOM},1} + #widgets::Array{WebIO.Node{WebIO.DOM},1} + widgets vals::Dict end @@ -62,6 +63,13 @@ function GUI() GUI(10) end +function (gui::GUI)() + # This ensures that observables don't time out, removing this will + # break everything and it will be impossible to track down. + watched = Node(:div, style=Dict(:display=>"none"), gui.widgets.widgets...) + Node(:div, gui.dom, watched) +end + """ Used to set the widgets, the dom or the data array of the GUI. This replaces any existing widget or dom in the GUI. """ @@ -179,7 +187,8 @@ function update(gui::GUI, s::Symbol, watchsymbol=:0) # if the value of the widget associated with watchsymbol has changed w = gui.widgets[s] if watchsymbol==:0||has_changed(gui, watchsymbol) - obs(w).listeners[2](obs(w)[]) + #obs(w).listeners[2](obs(w)[]) + obs(w)[] = obs(w)[] end end function update(gui::GUI, a::Array, watchsymbol=:0)