Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: MethodError: no method matching create_from_file!(::Mousetrap.detail._IconAllocated, ::String) #91

Open
4lrdyD opened this issue Dec 30, 2024 · 0 comments

Comments

@4lrdyD
Copy link

4lrdyD commented Dec 30, 2024

Hi, I'm trying to create an icon with a png file, but I get an error:

julia> myicon=Icon("ml.png")
ERROR: MethodError: no method matching create_from_file!(::Mousetrap.detail._IconAllocated, ::String)

Closest candidates are:
  create_from_file!(::Union{Mousetrap.detail._Icon, CxxWrap.CxxWrapCore.CxxRef{<:Mousetrap.detail._Icon}}, ::Union{AbstractString, CxxWrap.CxxWrapCore.ConstCxxRef{<:CxxWrap.StdLib.StdString}, CxxWrap.CxxWrapCore.CxxRef{<:CxxWrap.StdLib.StdString}}, ::Integer, ::Integer)
   @ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
  create_from_file!(::Union{Ptr{Nothing}, CxxWrap.CxxWrapCore.CxxPtr{<:Mousetrap.detail._Icon}}, ::Union{AbstractString, CxxWrap.CxxWrapCore.ConstCxxRef{<:CxxWrap.StdLib.StdString}, CxxWrap.CxxWrapCore.CxxRef{<:CxxWrap.StdLib.StdString}}, ::Integer, ::Integer)
   @ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
  create_from_file!(::Union{Mousetrap.detail._Image, CxxWrap.CxxWrapCore.CxxRef{<:Mousetrap.detail._Image}}, ::Union{AbstractString, CxxWrap.CxxWrapCore.ConstCxxRef{<:CxxWrap.StdLib.StdString}, CxxWrap.CxxWrapCore.CxxRef{<:CxxWrap.StdLib.StdString}})
   @ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
  ...

Stacktrace:
 [1] create_from_file!(x::Icon, path::String)
   @ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:225
 [2] Icon(path::String)
   @ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:1834
 [3] top-level scope
   @ REPL[91]:1

Also, I tried it this way:

julia> myicon=Icon()
Icon(name = "")

julia> create_from_file!(myicon,"ml.png")
ERROR: MethodError: no method matching create_from_file!(::Mousetrap.detail._IconAllocated, ::String)

Closest candidates are:
  create_from_file!(::Union{Mousetrap.detail._Icon, CxxWrap.CxxWrapCore.CxxRef{<:Mousetrap.detail._Icon}}, ::Union{AbstractString, CxxWrap.CxxWrapCore.ConstCxxRef{<:CxxWrap.StdLib.StdString}, CxxWrap.CxxWrapCore.CxxRef{<:CxxWrap.StdLib.StdString}}, ::Integer, ::Integer)
   @ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
  create_from_file!(::Union{Ptr{Nothing}, CxxWrap.CxxWrapCore.CxxPtr{<:Mousetrap.detail._Icon}}, ::Union{AbstractString, CxxWrap.CxxWrapCore.ConstCxxRef{<:CxxWrap.StdLib.StdString}, CxxWrap.CxxWrapCore.CxxRef{<:CxxWrap.StdLib.StdString}}, ::Integer, ::Integer)
   @ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
  create_from_file!(::Union{Mousetrap.detail._Image, CxxWrap.CxxWrapCore.CxxRef{<:Mousetrap.detail._Image}}, ::Union{AbstractString, CxxWrap.CxxWrapCore.ConstCxxRef{<:CxxWrap.StdLib.StdString}, CxxWrap.CxxWrapCore.CxxRef{<:CxxWrap.StdLib.StdString}})
   @ Mousetrap ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
  ...

Stacktrace:
 [1] create_from_file!(x::Icon, path::String)
   @ Mousetrap ~/.julia/packages/Mousetrap/CHEs7/src/Mousetrap.jl:225
 [2] top-level scope
   @ REPL[93]:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant