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