Setting and Retrieving Property Values

  

DEVELOPER

Property values are set and retrieved through the use of Property Logic Commands, e.g.

Setting:             CustName.Forecolor = ‘BLUE

Retrieving:          $COLOR = CustName.FOREcolor

The values used can be strings or numbers, both literals and variables (including other property values) depending on the property involved.  String values can either be a logical value (such as a colour or font name), or the physical value.

The length of time that an object property value will remain in effect and where the value may be set depends upon the object.

Resetting the Property’s Value

The new property value will remain in effect according to the following definition:

  1. If there is an active record in the cycle that contains the object the new property value will remain in effect until a new record is fetched.  Objects belong to a cycle if they are fields in the screen or files.  The logic points that are executed when the record is active are:

    All Field Logics
    All File Read Logics.

  2. If the object does not belong to an active record the new property value becomes the default value and remains in effect until a new Property Logic statement changes it.

  3. For objects not associated with records, such as SESSION and APPLICATION, changes to the properties of these objects are always permanent until a new Property Logic statement affects it.

  4.  A record is considered active when field processing begins in a screen or report. In an update, the record is active when file read processing begins. The effect of this is that Default and Entry Logics are performed outside the active record for the cycle; properties set in those Logics for objects in the current cycle are permanent changes. 

This algorithm results in the following rules:

  1. A Set Property command can be executed for any object in the current function.

  2. If the Property Logic statement is executed before any field processing begins (i.e. in On Cycle Entry logic or in Cycle Screen Mode logic) the property value becomes the default.

Comment on this topic

Topic ID: 510012