lib/ppcurses/actions/GetDataAction.rb in ppcurses-0.0.16 vs lib/ppcurses/actions/GetDataAction.rb in ppcurses-0.0.17

- old
+ new

@@ -46,11 +46,10 @@ def execute() createWindow() echo - #y = @win.cury + 1 @win.setpos(@win.cury,xPadding()) self.beforeActions() @actions.each do |action| @@ -86,15 +85,15 @@ end def promptToChangeData(preparedSQL) self.printLine(preparedSQL) - @win.addstr("Proceed? ") - echo - c = @win.getch() - noecho + proceed = GetBooleanAction.new("Proceed? ") + proceed.setParentAction(self) + proceed.setWindow(@win) + proceed.execute() - if c == "y" or c == "Y" then + if proceed.data == "1" then self.printLine("") begin @db.execute preparedSQL self.printSuccessLine("Execution successful") rescue SQLite3::Exception => e