Edit in the widget window and collect the results.
(self, validate=None)
| 175 | return result |
| 176 | |
| 177 | def edit(self, validate=None): |
| 178 | "Edit in the widget window and collect the results." |
| 179 | while 1: |
| 180 | ch = self.win.getch() |
| 181 | if validate: |
| 182 | ch = validate(ch) |
| 183 | if not ch: |
| 184 | continue |
| 185 | if not self.do_command(ch): |
| 186 | break |
| 187 | self.win.refresh() |
| 188 | return self.gather() |
| 189 | |
| 190 | if __name__ == '__main__': |
| 191 | def test_editbox(stdscr): |