Closed akemn closed 4 years ago
I don't have a Mac to test with. Does tcod.context.new_window
have the same issue? And does providing a tileset for the context change anything?
Other things to check: Does tcod.console_init_root
open a window correctly? And does adding event handling make the window work correctly:
import tcod
context = tcod.context.new_terminal(30, 30, title='test')
console = tcod.Console(*context.recommended_console_size())
while True:
# Display the console.
console.clear()
console.print(0, 0, "Hello World")
context.present(console)
for event in tcod.event.wait():
if event.type == "QUIT":
raise SystemExit()
And does adding event handling make the window work correctly:
Yep, this was the issue. Added event handling and now it works correctly. Apologies! Same behavior with console_init_root
: event handling required.
No problem. I'll try to keep this in mind in case anyone else has the same issue.
On macOS 10.15.4, attempting to run a minimal "hello world" using the new tcod.context API does not yield any console.
To reproduce, attempt to run:
This will start up a bouncing Python rocket icon in the dock, but nothing else happens. Continue with:
And still nothing happens. The Python rocket icon continues bouncing and must be force quit.