Class Documentation

Name:Set
Version:1.0
ID:ID_SET
Status:Stable
Category:Command
Date:December 2001
Author:Rocklyte Systems
Copyright:  Rocklyte Systems (c) 2000-2001. All rights reserved.



Description

The Set class provides a way to update the field values of any public object during script execution. It can also be made static, which allows the Set object to update field values during run-time, whenever it is activated. To create a valid Set object, tell it what object to interact with and then list the fields that you want set using the unlisted field modifier ('&' character). If you want the object to be static, make sure that you use the static keyword before listing the fields, or the Set object will pass on the new field values immediately.

The following example illustrates how to update the x and y values of a render object:

   <render name="area" x="100" y="200" width="50" height="60"/>
   <set object="[area]" &x="=[area.x]+50" &y="100"/>

If necessary, Set objects that have been defined as static can also perform run-time object translations and calculations. To activate this feature, simply enclose the field setting in '$' characters, e.g:

   <set static object="[area]" &x="$=[area.x]+50$" &y="100"/>

Actions

The Set class supports the following actions:

Activate  Activates a Set object.
ClosingTag  If the object is non-static, this action will cause the Set object to activate and then self-destruct.
GetUnlistedField  This action is supported for retrieving unlisted field values.
SetUnlistedField  This action is supported for setting foreign object field values.

Structure

The Set object consists of the following public fields:

Object  Refers to the object that will receive the field settings.
Static  Set to TRUE to make the object static.
Field:Object
Short:Refers to the object that will receive the field settings.
Type:STRING/OBJECTID
Status:Read/Write

You will need to set this field so that it refers to the object that will receive the Set object's field settings. If the Object is not set or is invalid, the Set object will fail when activated.

If you set this field with a string, the object reference will be translated to an ID in run-time.


Field:Static
Short:Set to TRUE to make the object static.
Type:BOOLEAN
Status:Read/Init

To make the object static, set this field to TRUE. If the object is not made static then it will self-destruct when a closing tag is received.