MCPcopy Index your code
hub / github.com/python/cpython / ok

Method ok

Lib/tkinter/simpledialog.py:189–201  ·  view source on GitHub ↗
(self, event=None)

Source from the content-addressed store, hash-verified

187 # standard button semantics
188
189 def ok(self, event=None):
190
191 if not self.validate():
192 self.initial_focus.focus_set() # put focus back
193 return
194
195 self.withdraw()
196 self.update_idletasks()
197
198 try:
199 self.apply()
200 finally:
201 self.cancel()
202
203 def cancel(self, event=None):
204

Callers

nothing calls this directly

Calls 5

validateMethod · 0.95
applyMethod · 0.95
cancelMethod · 0.95
update_idletasksMethod · 0.80
focus_setMethod · 0.45

Tested by

no test coverage detected