Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does def callback block printing to repl? #20

Open
izz-j opened this issue Jun 22, 2017 · 1 comment
Open

does def callback block printing to repl? #20

izz-j opened this issue Jun 22, 2017 · 1 comment

Comments

@izz-j
Copy link

izz-j commented Jun 22, 2017

I try to call princ and format inside a def callback to print the key value when pressed, but I do not get an output. I don't want to print the keys to show up in the title bar like in the event.lisp example. Is there anyway to do this?

@tavurth
Copy link
Contributor

tavurth commented Sep 18, 2017

@izz-j

You need to use FINISH-OUTPUT, or FORCE-OUTPUT.

In systems with buffered output streams, some output remains in the output buffer until the output buffer is full (then it will be automatically written to the destination) or the output buffer is emptied.

(format t "Hello, world!~%")
(force-output)

https://stackoverflow.com/a/2078561

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants