Skip to content
This repository was archived by the owner on Apr 17, 2020. It is now read-only.
This repository was archived by the owner on Apr 17, 2020. It is now read-only.

Sliders does not work with arrays #17

@korsbo

Description

@korsbo
slider([1.,2.,3.])

does not work for me in Juno. I think that the immediate culprit is:

extra_vbinds["data"] = "vals"=>WebIO.jsexpr(svals)

where WebIO should be JSExpr. But when I changed this, I get new errors when I actually use the slider:

MethodError: Cannot `convert` an object of type String to an object of type Float64
This may have arisen from a call to the constructor Float64(...),
since type constructors fall back to convert methods.
Stacktrace:
 [1] setexcludinghandlers(::Observables.Observable{Float64}, ::String, ::WebIO.##32#33) at /home/Niklas/.julia/v0.6/Observables/src/Observables.jl:77
 [2] dispatch(::WebIO.Scope, ::String, ::String) at /home/Niklas/.julia/v0.6/WebIO/src/scope.jl:298
 [3] dispatch(::WebIO.BlinkConnection, ::Dict{String,Any}) at /home/Niklas/.julia/v0.6/WebIO/src/connection.jl:48
 [4] (::WebIO.##103#104{WebIO.BlinkConnection})(::Dict{String,Any}) at /home/Niklas/.julia/v0.6/WebIO/src/providers/blink.jl:16
 [5] macro expansion at /home/Niklas/.julia/v0.6/Lazy/src/macros.jl:260 [inlined]
 [6] ws_handler(::Dict{Any,Any}) at /home/Niklas/.julia/v0.6/Blink/src/content/server.jl:53
 [7] splitquery(::Blink.#ws_handler, ::Dict{Any,Any}) at /home/Niklas/.julia/v0.6/Mux/src/basics.jl:28
 [8] wcatch(::Mux.##1#2{Mux.#splitquery,Blink.#ws_handler}, ::Dict{Any,Any}) at /home/Niklas/.julia/v0.6/Mux/src/websockets_integration.jl:12
 [9] (::Mux.##1#2{Mux.##3#4{Mux.##3#4{Mux.#todict,Mux.#wcatch},Mux.#splitquery},Blink.#ws_handler})(::Tuple{HttpCommon.Request,WebSockets.WebSocket}) at /home/Niklas/.julia/v0.6/Mux/src/Mux.jl:10
 [10] (::Mux.##13#14{Mux.App})(::HttpCommon.Request, ::WebSockets.WebSocket) at /home/Niklas/.julia/v0.6/Mux/src/server.jl:38
 [11] handle(::WebSockets.WebSocketHandler, ::HttpCommon.Request, ::HttpServer.Client{TCPSocket}) at /home/Niklas/.julia/v0.6/WebSockets/src/WebSockets.jl:484
 [12] (::HttpServer.#on_message_complete#14{HttpServer.Server,HttpServer.Client{TCPSocket},Bool})(::HttpCommon.Request) at /home/Niklas/.julia/v0.6/HttpServer/src/HttpServer.jl:420
 [13] on_message_complete(::Ptr{HttpParser.Parser}) at /home/Niklas/.julia/v0.6/HttpServer/src/RequestParser.jl:113
 [14] http_parser_execute(::HttpParser.Parser, ::HttpParser.ParserSettings, ::Array{UInt8,1}) at /home/Niklas/.julia/v0.6/HttpParser/src/HttpParser.jl:115
 [15] process_client(::HttpServer.Server, ::HttpServer.Client{TCPSocket}, ::Bool) at /home/Niklas/.julia/v0.6/HttpServer/src/HttpServer.jl:389
 [16] (::HttpServer.##7#8{HttpServer.Server,Bool})() at ./task.jl:335

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions