Skip to content
Snippets Groups Projects
Commit c3c7e2b1 authored by Jacob Wikmark's avatar Jacob Wikmark
Browse files

merge

parents aacc2e8d 3de53341
Branches
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment