When a KUIML file is loaded, it happens the following:
The file is parsed a first time to determine the data model to expose.
The file is fully parsed and actual data model, user interface and exposed elements are created in memory. This is similar to the build phase of a compiler.
Once all objects are available in memory, the KUIML engine goes into the linking phase, connecting all objects together, checking types and missing objects.
If no error occurred and the structure has been successfully created, the data model is exposed to the scripting engine, and scripts are verified and compiled.