You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use atom-julia-client together with the ImageView package, I get the following error message for inline evaluation:
MethodError: convert has no method matching convert(::Type{Tk.TkWidget}, ::ASCIIString, ::ASCIIString)
This may have arisen from a call to the constructor Tk.TkWidget(...),
since type constructors fall back to convert methods.
Closest candidates are:
Tk.TkWidget(!Matched::Tk.TkWidget, ::Any)
call{T}(::Type{T}, ::Any)
convert{T}(::Type{T}, !Matched::T)
[inlined code] from /home/lars/.julia/v0.4/Lazy/src/dynamic.jl:69
in anonymous at /home/lars/.julia/v0.4/Atom/src/eval.jl:59
in anonymous at /home/lars/.julia/v0.4/Atom/src/eval.jl:58
Note that this error message occurs for arbitrary julia statements, not just those that return a TkWidget. Evaluating the whole file works, however.
The text was updated successfully, but these errors were encountered:
Hm. This seems to be a problem with Tk.jl, if I understand correctly: Here, Tk creates a new constructor for Text, which completly overrides the constructor for Base.Text -- I don't see any way to call that one after using Tk:
julia>which(Text, (ASCIIString,))
call{T}(::Type{Text{T}}, content::T) at docs\utils.jl:68
julia>import Tk
julia>which(Text, (ASCIIString,))
call(::Type{Text{T}}, parent::Union{AbstractString,Tk.Canvas,Tk.TkWidget,Tk.Tk_Widget}) at ...\Tk\src\widgets.jl:48
julia>which(Base.Text, (ASCIIString,))
call(::Type{Text{T}}, parent::Union{AbstractString,Tk.Canvas,Tk.TkWidget,Tk.Tk_Widget}) at ...\Tk\src\widgets.jl:48
We obviously want to use Base.Text, not Tk's implemntation, e.g. here, but there doesn't seem to be any way to do that (at least given my admittedly very incomplete understanding of Julia modules).
So I think not importing Base.Texthere would be the only real solution to this problem -- maybe there's a way to access the base method and changing Tk is unnecessary, but I don't know of one.
CC: @MikeInnes
Well, using Text{ASCIIString}("mytext") instead of Text("mytext") still seems to work... But this really seems to be an issue of Tk, that should be fixed.
When I use atom-julia-client together with the ImageView package, I get the following error message for inline evaluation:
Note that this error message occurs for arbitrary julia statements, not just those that return a TkWidget. Evaluating the whole file works, however.
The text was updated successfully, but these errors were encountered: