Closed MatthewRock closed 8 years ago
There's double refreshing. Question: Is it better to refresh in INITIALIZE
or is it better within WITH-CURSES
? I suspect from within WITH-CURSES
but I have no solid rationale as to why.
I'm sorry. I thought I got rid of it.
I think that INITIALIZE
should do refreshing, not the WITH-CURSES. Here's why:
INITIALIZE
's job is to provide everything you need to start working with curses. After that, you use FINALIZE (if I remember the name correctly) to clean up after yourself.
The WITH-CURSES
macro is a utility that basically does this for you.
Now if we put this in INITIALIZE
, we both fix the issue, and make sure that anybody has usable console window from the beginning. The window that is initialised should have proper dimensions.
If we shift this towards macro, we might find a user who decides to write some other macro, and he'll have to remember to refresh the window. This might be confusing, and is really outside the scope of with-curses
macro, I guess.
This is a response for issue #28 .
When creating a window, it's not updated and reports back wrong dimensions, which doesn't happen in programs written in C. The fix for this issue is updating the window right after its creation.
Example code that was failing previously, but works now: