def METHOD_NAME(self, validate=None):
    "Edit in the widget window and collect the results."
    while 1:
        ch = self.win.getch()
        if validate:
            ch = validate(ch)
        if not ch:
            continue
        if not self.do_command(ch):
            break
        self.win.refresh()
    return self.gather()