I have the following code
class TimeReport
def run
init_screen
lines = Curses::lines
cols = Curses::cols
read=""
begin
crmode
noecho
gotoDay diaActual.data.to_s #loads the screen with data
while !read.eql?("q")
printPrompt #simply prints the command prompt
read=STDIN.getc
printOnSpot 10,10,read.to_s #prints what was read
if(!read.empty? && !read.strip.empty?)
processPrompt(read,@ecra) # process the read command
else
printInfo "Say What??"
end
end
ensure
echo
nocrmode
close_screen
end
end
end
TimeReport.new.run
When i try running the application the application locks and doesnt init the screen. If i use Curses.getch this issue doesn't occur.
Can anyone enlighten me as to why this happens? and ways to fix the issue?