[Gambas-user] ncurses, question

Tobias Boege taboege at gmail.com
Wed Jan 6 13:52:05 CET 2021

On Mon, 04 Jan 2021, Brian G wrote:
> Tobias,
> When I run your program in a terminal
> it hangs in the ncurses mode no input unless I add
> an explicit quit instruction.
> quit 0
> if i just add a screen.suspend()
> it goes back to terminal but never exits

Isn't this normal? Do you have an old ncurses project which behaves
differently since that commit? I have an older 3.14.90 here where a
gb.ncurses application also doesn't terminate on its own.

This is because gb.ncurses watches the input file descriptor for
keystrokes, keeping the Gambas process running in the event loop,
for as long as there is a valid Window object. (This is the same
as with gb.qt4, superficially.) And there is always a default,
static Window object representing the whole screen.

The project I sent you should print, step out of and into ncurses
mode and print again, all on its own. When it says "Bye bye", you
can ctrl+c it.


"There's an old saying: Don't change anything... ever!" -- Mr. Monk

More information about the User mailing list