Since it's possible to load only a few pages from either import files or load files, when The Dotfile Generator is running, it becomes a bit muddy to understand when the different functions are invoked. By that reason, heres comes a list, which described when each function is invoked:
The Init function is called for each page at startup, with the variable changeElm set to init.
Each time a new tuple is inserted into an ExtEntry, the Init function is called, with variables linked for the new tuple (see ``visual variables''). The variable changeElm is this time set to the name of the ExtEntry. The Change function is called for each new element of the ExtEntry, with the variable changeElm set to the name of the variable.
The Change function is called each time an element changes on the page, with visual variables linked, and the variable changeElm set to the name of the variable changed.
The ShowPage function is called each time a page is entered.
When a page has been imported from an export file, reset to defaults, or
just started up without being set to any value the page is marked as
dirty. Each active FillOutElm (ie. those maped in
fillouts) are marked dirty too.
When a dirty page is opened, the Change function is called for each element on the page (ie. the changeElm variable is set to the name of each element, and the change function is called) Execpt widgets located inside active FillOutElm's. The Change function is first invoked for these elements when they become visual on the screen (ie. their window is opened)
The invokation of the Change function throughout a dirty page makes the page clean again.
When a page is overwritten from an export file, the Init function is called with the variable changeElm set to init, before the actual import is taken place.
When new elements are inserted from an export file, the Init function is called as usually, with changeElm set to the name of the ExtEntry.
As can be seen from above, the init function may not read any value, as it is called before the values are read.