PEATDB/PEATTables.py
def add_Row(self, recname=None):
        """Add a new rec in PEAT, need special dialog"""
        def checkrow_name(rowname):
            if rowname == '':
                tkMessageBox.showwarning("Whoops", "Name should not be blank.")
            if self.getModel().data.has_key(rowname):
                tkMessageBox.showwarning("Name exists", "Record already exists!")

        if recname == None:
            recname = tkSimpleDialog.askstring("New rec name?", "Enter rec name:")
        checkrow_name(recname)
        self.model.addRow(recname)
        self.setSelectedRow(self.model.getRecordIndex(recname))
        self.redrawTable()
        return
Add a new rec in PEAT, need special dialog
Add a new rec in PEAT, need special dialog
Add a new rec in PEAT need special dialog
def add_Row(self, recname=None):
        def checkrow_name(rowname):
            if rowname == '':
                tkMessageBox.showwarning("Whoops", "Name should not be blank.")
            if self.getModel().data.has_key(rowname):
                tkMessageBox.showwarning("Name exists", "Record already exists!")
        if recname == None:
            recname = tkSimpleDialog.askstring("New rec name?", "Enter rec name:")
        checkrow_name(recname)
        self.model.addRow(recname)
        self.setSelectedRow(self.model.getRecordIndex(recname))
        self.redrawTable()
        return
def add_Row ( self , recname = None ) : def checkrow_name ( rowname ) : if rowname == '' : tkMessageBox . showwarning ( "Whoops" , "Name should not be blank." ) if self . getModel ( ) . data . has_key ( rowname ) : tkMessageBox . showwarning ( "Name exists" , "Record already exists!" ) if recname == None : recname = tkSimpleDialog . askstring ( "New rec name?" , "Enter rec name:" ) checkrow_name ( recname ) self . model . addRow ( recname ) self . setSelectedRow ( self . model . getRecordIndex ( recname ) ) self . redrawTable ( ) return
Add a new rec in PEAT, need special dialog
Add a new rec in PEAT need special dialog
"""Add a new rec in PEAT, need special dialog"""
self
recname