EventAction
EventAction
EntitySet of event/action mappings.
Fields
WindowTag | Identifies the tag of the window in which the event occurred. This field can have the value “Unknown” which matches any window tag. |
ObjectTag | Identifies the tag of the object (window, form, form field) associated with the event. This field can have the value “Unknown” which matches any object tag. |
EventType | Identifies the type of user interface event that occurred. |
EventName | Identifies the event that occurred. This is usually the name of the event (e.g. “Click”) or the name of an accelerator key. This field can have the value “Unknown” which matches any event name. |
Action | Identifies the action to be associated with the event. Special values for Action (see below) indicate that the value of Action is to be taken from the Event structure. |
Macro | Identifies a “callback” command line that is executed when the event occurs. This macro is executed by pGetAction and the action is not returned to the caller. |
Comment | An area containing comments for documentation purposes. |
EventActionOwner | Defines the owner of this mapping. Standard mappings have EventActionOwner set to “System”. If you add your own application specific mappings, you should specify a different owner (“Application” for example). You should not change or delete any entries with a “System” owner. This field is not used in mapping events to actions. Its purpose is to distinguish standard mappings from application specific mappings. |
RecId | RecId contains a unique key (an integer) for each entry in the table. As long as the value is unique, any numeric value may be used in this field. |
Comments
EventAction is an EntitySet defined in $DeployServices. Every Zim database has its own copy of EventAction . Note that WindowTag, ObjectTag, EventType, and EventName correspond to the fields WindowTag, EventTag, EventName, and EventType in the Event structure. For more information, see Events.
Note: The actual filename for the EventAction copy is Zim0125 and is located in a subdirectory of your database directory called DPSRT.
The Action field contain certain special values that indicate that, at runtime, the actual “action” is to be taken from the Event structure as follows:
Contents of Action field | Action value to be taken from: |
Event.EventTag | |
Event.EventName | |
Event.WindowTag | |
Event.MenuTag | |
Event.MenuItemTag | |
Event.FormTag | |
Event.FieldTag | |
Event.EventType | |
Event.MouseClick | |
Event.KeyPressed | |
Event.ScrollingKey | |
Event.ShiftKey | |
Event.CtrlKey | |
Event.AltKey |
- The first group of entries provides standard mappings for certain accelerator keys. For example, Escape is mapped to the Discard action. In a data entry window, this means that any data modifications should be thrown away. All these mappings tend to enforce consistent usage of accelerators in different applications.
- The window event mappings translate the window events to actions whose names more closely indicate what happened (e.g. EnterWindow versus GotFocus on a Window).
- The FormField and MenuItem event mappings provide meaningful action names for these events.
- A number of mappings are provided to support the use of the spy window. For more information, refer to The Application Framework.
- Finally, a number of entries provide callbacks for menu items that have the indicated tags. In effect, by attaching one of these tags to one of your menu items, the indicated callback (usually a Framework service) is automatically called when you click on those menu items. These entries are easily identified by the Comment field that always begins with “Framework callback:”.