(self, wnd, callback=None)
Close active frame
Close active frame
Close active frame
def file_close(self, wnd, callback=None):
        "Close active frame"

        import kaa.fileio

        frame = wnd.get_label('frame')

        def saved(canceled):
            if canceled:
                return

            if frame.mainframe.childframes:
                f = frame.mainframe.childframes[0]
                f.bring_top()
                kaa.app.set_focus(f)
            else:
                doc = kaa.app.storage.newfile(temporary=True)
                kaa.app.show_doc(doc)

        self.close_frame(frame, saved)
def file_close ( self , wnd , callback = None ) : import kaa . fileio frame = wnd . get_label ( 'frame' ) def saved ( canceled ) : if canceled : return if frame . mainframe . childframes : f = frame . mainframe . childframes [ 0 ] f . bring_top ( ) kaa . app . set_focus ( f ) else : doc = kaa . app . storage . newfile ( temporary = True ) kaa . app . show_doc ( doc ) self . close_frame ( frame , saved )