lib/ppcurses/actions/GetIntegerAction.rb in ppcurses-0.0.16 vs lib/ppcurses/actions/GetIntegerAction.rb in ppcurses-0.0.17
- old
+ new
@@ -4,12 +4,14 @@
class GetIntegerAction < PromptAction
def execute()
y = @win.cury()
+ @data = ""
begin
@win.setpos(y,xPadding())
@win.clrtoeol()
+ @win.box("|", "-")
@win.addstr(@prompt)
echo
@data = @win.getstr()
noecho
end while not @data =~ /^\d+$/