Skip to content

Commit

Permalink
Merge pull request #18 from JuliaGizmos/pv/abstract
Browse files Browse the repository at this point in the history
support abstractobservable in interpolation
  • Loading branch information
Pietro Vertechi authored Aug 21, 2018
2 parents 3691247 + 58c8a1e commit de68f57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ julia 0.7
JSON
MacroTools
WebIO 0.3.0
Observables 0.2.2
3 changes: 2 additions & 1 deletion src/JSExpr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ using JSON, MacroTools, WebIO
export JSString, @js, @js_str, @var, @new

import WebIO: JSString, JSONContext, JSEvalSerialization
using Observables: AbstractObservable

macro js(expr)
:(JSString(string($(jsstring(expr)...))))
Expand Down Expand Up @@ -54,7 +55,7 @@ function obs_set_expr(x, val)
F(["WebIO.setval(", jsexpr_joined([x, val]), ")"])
end

function jsexpr(o::WebIO.Observable)
function jsexpr(o::AbstractObservable)
if !haskey(WebIO.observ_id_dict, o)
error("No scope associated with observer being interpolated")
end
Expand Down

0 comments on commit de68f57

Please sign in to comment.