def setIdValues(self, init): if init == 1: if TokList.getIdValue(self.id.name) == 'null': print('ERROR: value ' + self.id.name + ' is already initialized') exit() #Initialized to 'null' as None is the previous assignment, 'null' is used later to check for initialization TokList.setIdValue(self.id.name, 'null') if self.id_list is not None: self.id_list.setIdValues(1) else: self.id.setValue(TokList.currentData()) TokList.nextData() if self.id_list is not None: self.id_list.setIdValues(0)
def setValue(self, val): if TokList.getIdValue(self.name) is None: print('ERROR: Value not initialized') TokList.setIdValue(self.name, val)