How to make a decent CLI application in Jack?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to make a decent CLI application in Jack?

sikkiiac
I'm trying to write a simple CLI application in Jack. The problem I'm running into is that when text "wraps" around the screen the new text is inserted over the old text. I.e, the old text is never cleared.

Here's what the application looks like at first:



Here's what it looks like after wrapping:



Any ideas on how to fix this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make a decent CLI application in Jack?

cadet1620
Administrator
For menu driven applications that I've written, I put Screen.clearScreen() calls before presenting the menu.

You could also try writing you own println() function that does an Output.println() followed by erasing the new line using spaces and backspaces.

--Mark

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to make a decent CLI application in Jack?

sikkiiac
Thanks for pointing out Screen.clearScreen(). I should have read the OS API more carefully to find that. Erasing a line using spaces and backspaces is an interesting idea.
Loading...