As with the block and trial levels, the data and routines involved in the overall experiment are encapsulated in object form at a higher level. The experiment data and associated routines are combined to define the Context object. Within the Context object, information is hierarchical. This hierarchical nature allows values from upper levels to be either inherited or reset at lower levels, while search procedures to determine the value of attributes occur at the current level and continue in an upward direction until the information is located
For example, if an attribute is defined at the block level, this attribute will be available at the block level and all levels subordinate to the block level (e.g., trial, sub-trial, etc.). When values are requested, the current level is searched first, and the search continues upward through the levels until a value is found or until all levels have been exhausted. This defines a hierarchy of context levels within the overall Context. If a value for an attribute is requested during a trial, E-Run will search the trial level context first, then the next level of context (e.g., block level), and so on, to resolve the value for the attribute.
Further, perhaps a series of blocks of trials is to be run, with the instructions for a series of trials changing only when the next block is run. An attribute named “Instructions” would most likely be created at the block level, since the value of the Instructions attribute would only need to vary from block to block. However, perhaps the instructions are to be displayed at the beginning of each trial as a reminder of the task. A display during the trial Procedure would necessarily reference the Instructions attribute (i.e., [Instructions]), which is defined at the block level. E-Run would first check the trial level context, then the block level context, and then the session level context in order to resolve the value of Instructions. In this example, the search would terminate at the block level, where the Instructions attribute is defined.
Data within the Context object is manipulated through the creation and setting of attributes. Attributes differ from variables in that they generally define the experimental conditions and are logged by default. The logging may be disabled for individual attributes.
Attributes must be entered into the Context of the experiment before they may be referenced or modified. Although the Context object outlines the overall experiment, the Context is hierarchically structured. Attributes defined at a specific level of the Context may be seen by any level lower than the one at which the attribute is defined, and upper level information may be inherited by lower level attributes. However, attributes defined at lower levels of the Context cannot be “seen” beyond the level at which they are defined. Thus, in order to reference or modify an attribute, it must be placed in the Context and set at the appropriate level. When attributes are created via the graphic objects in E-Studio, specifically with the ListObject, E-Studio automatically places the attributes in the Context. When the user creates attributes manually with script, the user must also manually first place the attribute into the Context. See SCRIPTING: Attributes  for further information.
Next Article: SCRIPTING: Object Properties 
Previous Article: SCRIPTING: Communicating with E-Prime Objects