def modal_event_loop(self): disabled = [] for window in application().windows: if window is not self: if not window._win.EnableWindow(False): #print "Window.modal_event_loop: disabled", window.title ### disabled.append(window) status = self._win.RunModalLoop(0) if status: print "Window._modal_event_loop:", self, "status =", status ### #raise Cancel for window in disabled: #print "Window.modal_event_loop: enabling", window.title ### window._win.EnableWindow(True) if status <> 0: ### from GUI.Exceptions import InternalError ### raise InternalError("RunModalLoop returned %s" % status) ###
def _win_menu_command(self, id): raise InternalError("_win_menu_command called on non-window: %r" % self)