From e2e04b9bcae4ad9ccc55ba9e29287abfc46479ab Mon Sep 17 00:00:00 2001
From: Erik Kooistra <kooistra@astron.nl>
Date: Thu, 21 Apr 2016 13:28:02 +0000
Subject: [PATCH] Added explanation on parallel lists.

---
 tools/oneclick/base/common_dict_file.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tools/oneclick/base/common_dict_file.py b/tools/oneclick/base/common_dict_file.py
index 35efeb9c23..5b7cabbc13 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)
-- 
GitLab