def perform_close(self, editor): if list(app.iter_editors_with_view_of_document(self.document)) == [editor]: info = app.context.put(editor) editor.current_view = self self.document.canCloseDocumentWithDelegate_shouldCloseSelector_contextInfo_( self, "document:shouldClose:contextInfo:", info) else: editor.discard_and_focus_recent(self)
def perform_close(self, editor): if list(app.iter_editors_with_view_of_document( self.document)) == [editor]: info = app.context.put(editor) editor.current_view = self self.document.canCloseDocumentWithDelegate_shouldCloseSelector_contextInfo_( self, "document:shouldClose:contextInfo:", info) else: editor.discard_and_focus_recent(self)
def iter_dirty_docs(): for proj in self.projects: eds = app.find_editors_with_project(proj) if eds == [self]: for dv in proj.dirty_documents(): doc = dv.document editors = app.iter_editors_with_view_of_document(doc) if list(editors) == [self]: yield dv yield proj
def dirty_docs(): for dv in self.dirty_documents(): itr = app.iter_editors_with_view_of_document(dv.document) if list(itr) == [editor]: yield dv yield self
def dirty_docs(): for dv in self.dirty_documents(): itr = app.iter_editors_with_view_of_document(dv.document) if list(itr) == [editor]: yield dv yield self