diff --git a/tools/oneclick/base/common_dict_file.py b/tools/oneclick/base/common_dict_file.py index 35efeb9c23072cb37a3f44ab97543868151166cf..5b7cabbc13d1c98109158563fe60e3c9d4675dd1 100644 --- a/tools/oneclick/base/common_dict_file.py +++ b/tools/oneclick/base/common_dict_file.py @@ -83,6 +83,13 @@ Whether the key is a valid key depends on the dict user that interprets the dictionary. + The information about the <fileName> ini files is kept in parallel lists. + First all filePaths to the fileName ini files are found within the rooDir + tree and kept in two parallel lists of filePaths and filePathsNames. Then + the ini files are read and kept in a parallel list of dicts. Iherefore it + is important that the indexing of parallel lists remains intact at all + times. + It can be useful to be able to refer to the dicts based on a certain key value, e.g. a key value that gives the name of the dict. The methods get_key_values() and get_dicts() provide a means to easily link a dict @@ -94,7 +101,7 @@ 'filePath' = the full directory name where the dictionary file is stored 'filePathName' = filePath/fileName - + """ import common as cm @@ -122,7 +129,7 @@ class CommonDictFile: self.nof_dicts = len(self.dicts) # number of dictionaries = number of dictorary files def remove_dict_from_list(self, the_dict): - """Remove the_dict from the internal list of dicts from the available dictionary files.""" + """Remove the_dict from the internal list of dicts from the available dictionary files and from the parallel lists of filePaths and filePathNames.""" k = self.dicts.index(the_dict) self.filePaths.pop(k) self.filePathNames.pop(k)