event
Description
The event object is a type that provides a place for the user to
assign a function reference and an optional reference to any type. This
event can be named whatever the user wishes and is then called as
required. For example, if a type is created that contains a database
record, then the creator of the type could add an event object called
onsave
. Whenever the save()
method is called, the code can check to see if the
onsave.function
is assigned and if it is, call that
first, passing the appropriate parameters (as defined by the type
designer).
Type Tags
None
Object Value
The value of an object of type event is undefined and it is an error to attempt to get or to set it.
Properties
Property | Type | Description |
---|---|---|
function | function | This should be assigned a reference to the function that should be called when the event is fired. |
reference | type(*) | This can optionally be assigned a reference to any type. It will be passed as the final parameter to the function if it is assigned to an object. |
type | type | Specifies the event type object. |