Gnimuc / CImGui.jl

Julia wrapper for cimgui
https://github.com/cimgui/cimgui
MIT License
253 stars 25 forks source link

Long text example crash (`MethodError: no method matching Clipper(::Int64)`) #41

Closed pbouffard closed 3 years ago

pbouffard commented 3 years ago

Steps to reproduce:

  1. Start demo
  2. Examples>Long Text
  3. Choose "Multiple calls to Text(), clipped manually" from dropdown
julia> include(joinpath(pathof(CImGui), "..", "..", "examples", "demo.jl"))

┌ Error: Error in renderloop!
│   exception =
│    MethodError: no method matching Clipper(::Int64)
│    Closest candidates are:
│      Clipper() at /Users/patrick/.julia/packages/CImGui/svEI7/src/wrapper.jl:2972
└ @ Main ~/.julia/packages/CImGui/svEI7/examples/demo.jl:105

Stacktrace:
  [1] ShowExampleAppLongText(p_open::Base.RefValue{Bool})
    @ Main ~/.julia/packages/CImGui/svEI7/examples/app_long_text.jl:39
  [2] ShowDemoWindow(p_open::Base.RefValue{Bool})
    @ Main ~/.julia/packages/CImGui/svEI7/examples/demo_window.jl:64
  [3] top-level scope
    @ ~/.julia/packages/CImGui/svEI7/examples/demo.jl:83
  [4] include(fname::String)
    @ Base.MainInclude ./client.jl:444
  [5] top-level scope
    @ REPL[2]:1
  [6] eval(m::Module, e::Any)
    @ Core ./boot.jl:360
  [7] eval_user_input(ast::Any, backend::REPL.REPLBackend)
    @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:139
  [8] repl_backend_loop(backend::REPL.REPLBackend)
    @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:200
  [9] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
    @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:185
 [10] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
    @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:317
 [11] run_repl(repl::REPL.AbstractREPL, consumer::Any)
    @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:305
 [12] (::Base.var"#878#880"{Bool, Bool, Bool})(REPL::Module)
    @ Base ./client.jl:387
 [13] #invokelatest#2
    @ ./essentials.jl:707 [inlined]
 [14] invokelatest
    @ ./essentials.jl:706 [inlined]
 [15] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
    @ Base ./client.jl:372
 [16] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:302
 [17] _start()
    @ Base ./client.jl:485
Gnimuc commented 3 years ago

Those examples are ported from IMGUI 1.6x, so the implementation needs to be updated someday.