PEATDB/PEATApp.py
def updateCurrentMenu(self):
        """Update currently opened DBs menu from current proj dict"""

        menu = self.curr_menu['var']
        menu.delete(0, menu.index(END))
        menu.add_command(label='Close All',command=self.closeAll)
        menu.add_separator()
        for name in self.currentDBs:
            data = self.currentDBs[name]
            def func(data):
                def new():
                    self.hideDB()   #hide current
                    db = data['db']
                    f = self.filename = data['filename']
                    if f == None:
                        self.project = data['project']
                    self.loadDB(db)
                return new
            menu.add_command(label=name,
                                command=func(data))
        return
Update currently opened DBs menu from current proj dict
Update currently opened DBs menu from current proj dict
Update currently opened DBs menu from current proj dict
def updateCurrentMenu(self):
        menu = self.curr_menu['var']
        menu.delete(0, menu.index(END))
        menu.add_command(label='Close All',command=self.closeAll)
        menu.add_separator()
        for name in self.currentDBs:
            data = self.currentDBs[name]
            def func(data):
                def new():
                    self.hideDB()   
                    db = data['db']
                    f = self.filename = data['filename']
                    if f == None:
                        self.project = data['project']
                    self.loadDB(db)
                return new
            menu.add_command(label=name,
                                command=func(data))
        return
def updateCurrentMenu ( self ) : menu = self . curr_menu [ 'var' ] menu . delete ( 0 , menu . index ( END ) ) menu . add_command ( label = 'Close All' , command = self . closeAll ) menu . add_separator ( ) for name in self . currentDBs : data = self . currentDBs [ name ] def func ( data ) : def new ( ) : self . hideDB ( ) db = data [ 'db' ] f = self . filename = data [ 'filename' ] if f == None : self . project = data [ 'project' ] self . loadDB ( db ) return new menu . add_command ( label = name , command = func ( data ) ) return
Update currently opened DBs menu from current proj dict
Update currently opened DBs menu from current proj dict
"""Update currently opened DBs menu from current proj dict""" #hide current
self