Tk.jl icon indicating copy to clipboard operation
Tk.jl copied to clipboard

improve/port Tk event handling

Open JeffBezanson opened this issue 12 years ago • 3 comments

extras/tk.jl currently uses an X11-specific hack to handle events. We need to use a more portable method of integrating Tcl/Tk's event loop with our own.

We may need to use Tcl_CreateEventSource, as documented here: http://www.tcl.tk/man/tcl8.4/TclLib/Notifier.htm

This may require adding features like timers to our event loop, which will happen already with the libuv branch.

Issue moved from https://github.com/JuliaLang/julia/issues/1473

JeffBezanson avatar Nov 30 '12 09:11 JeffBezanson

Post the Windows merge, add_fd_handler is no longer available, and we need to get rid of it to be cross-platform in any case.

julia> require("Winston/src/Plot.jl")
in init: add_fd_handler not defined
 in init at /Users/viral/.julia/Tk/src/Tk.jl:51
 in include_from_node1 at util.jl:244
 in reload_path at util.jl:254
 in require at util.jl:223
 in include_from_node1 at util.jl:244
 in reload_path at util.jl:254
 in require at util.jl:223
at /Users/viral/.julia/Tk/src/Tk.jl:260

ViralBShah avatar Jan 08 '13 07:01 ViralBShah

I'm guessing this can be closed now?

timholy avatar May 21 '13 13:05 timholy

No, because we still aren't handling events properly. We are using a timer to poll, which is pretty awful.

JeffBezanson avatar Jun 15 '13 21:06 JeffBezanson