Script modules
Script modules
A script module contains a list of properties and methods of data objects of some type.
The script module is stored in the file typename.cms in the application folder.
Alternatively, the properties and methods may be stored directly in the application's .app file, as attributes of the object’s template (:attr field).
Every record in a script module describes one property or method. The record format is
(name . value)
If the value is a list (v1 v2 …), then the record may also be written as
(name v1 v2 ... )
The value may in turn be a list of properties with the same format:
(name
(p1 . v1)
(p2 . v2)
... )
Properties for a component of a data object may be stored either in the object’s script module as
(component_name
(property_name . value)
... )
or in the script module component_type.cms.
To distinguish between property names and component names, most property names start with colon character, e.g., :views.
Properties for interfaces of specific link types are stored in the file interfaces.cms. Every record represents properties of one link type:
(link_type
(p1 . v1)
(p2 . v2)
... )
A script method is a property whose value is known to be a script (i.e., a script command or a list of script commands).