Hi I am trying open a record from a shelve db I Know that it stops working at copy = db[opened]
But why please help ASAP
#*****START VARIABEL BLOCK*****
#file = the database/shelf file
#db = the database/shelf object
#tapp = to be appended/recorded to the database
#keys = a list of all the database's keys
#flag = if True = that record/rey already exists, if False = that record/rey does not exist
#Name = 1st field
#note = 2nd field
#strkey=str(key)
#*****END VARIABEL BLOCK*****
def on_OpenKey_command(self, event):
try:
global db
opened = str(self.components.key.text)
copy = db[opened]
tapp = []
tapp = easygui.multenterbox(msg = "Edit the properties,then press Ok to save.", title = "DataBank|Edit", fields = ("KEY","1","2","3","4","5","6","7","8","10"), values = copy)
tapp = copy
KEY = tapp[0]
KEY = str(KEY)
db[KEY] = tapp
self.components.dbItems.columnHeadings = [['KEY'], ['1'], ['2'], ['3'], ['4'], ['5'], ['6'], ['7'], ['8'], ['9'], ['10'],['11']]
self.components.dbItems.items = Items
Items = db.values()
self.components.dbItems.columnHeadings = [['KEY'], ['1'], ['2'], ['3'], ['4'], ['5'], ['6'], ['7'], ['8'], ['9'], ['10'],['11']]
self.components.dbItems.items = Items
except:
global db
tapp = []
tapp = easygui.multenterbox("Edit the properties,then press Ok to save.","DataBank|Edit", ("KEY","1","2","3","4","5","6","7","8","10"))
key = tapp[0]
keys = str(key)
db[keys] = tapp
Items = str(db.values())
Items = db.values()
self.components.dbItems.columnHeadings = [['KEY'], ['1'], ['2'], ['3'], ['4'], ['5'], ['6'], ['7'], ['8'], ['9'], ['10'],['11']]
self.components.dbItems.items = Items