Hi,
I'm fairly new to ruby and wanted to write some example programs in
ruby using ncurses-wrapper-library. That is, in fact, really simple
and works well.
But now I have a problem: I want ncurses to draw some things on the
screen and update it every second - until a key is pressed. I'm trying
to do it as follows (short example):
stop = nil
Thread.new do
until stop
Ncurses.printw("foo") # just an example...
Ncurses.refresh
sleep 1
end
Ncurses.endwin
end
Ncurses.getch
stop = 1
But I suppose Ncurses.getch blocks any other ncurses-functions from
writing anything on the window... so - what to do?
I just want to run the thread continuously until one key is pressed...
What other possibilities do I have?
Thanks in advance :-)
Julius