def OnCallback(self, hwnd, field_id):
        """If the user pressed a callback button associated with a text
        field, find the field and call its callback with the dialog window
        and the field's current value. If anything is returned, put that
        value back into the field.
        """
        field, default, callback = self.fields[self.IDC_FIELD_BASE - field_id]
        result = callback(hwnd, self._get_item(field_id))
        if result:
            self._set_item(field_id, result)
dataset/ETHPy150Open tjguk/winsys/winsys/dialogs.py/Dialog.OnCallback/swapped operands of `-`