My goal is to write a function that fills a Blink window with a table using TableView as quickly as possible.
To do this I want to load a Blink window once and then let it sit idle in the background until the user calls View
and populates it.
I have the following code
using Blink
w = Blink.Window()
This gives me the nice output
Window(1, Electron(Process(`/home/peterwd/.julia/packages/Blink/AO8uN/deps/atom/electron /home/peterwd/.julia/packages/Blink/AO8uN/src/AtomShell/main.js port 8800`, ProcessRunning), Sockets.TCPSocket(RawFD(0x00000013) active, 0 bytes waiting), Dict{String,Any}("callback" => getfield(Blink, Symbol("##1#2"))())), Page(1, WebSocket(server, CONNECTED), Dict{String,Any}("webio" => getfield(Blink.AtomShell, Symbol("##26#27")){Blink.AtomShell.WebIOBlinkComm}(Blink.AtomShell.WebIOBlinkComm(Window(#= circular reference @-5 =#))),"callback" => getfield(Blink, Symbol("##1#2"))()), Distributed.Future(1, 1, 1, Some(true))), Task (done) @0x00007fd340b4ceb0)
It takes about a second to load the window.
Now if the user closes the window, I have to load a brand new window to show them the table next time.
Is there any way, using Blink, to keep the window up and running in the background so and bring it to the front when the user populates it with a table?
Somethine like
if !active(w)
reopen(w) # does not exist as far as I can tell.
end
I have looked through the Blink code and can’t find a function that would do this.
Any answers that help clarify the mental model I should have in mind for this stuff is appreciated.