TNM Map
Bindings
| Binding |
Description |
| %% |
Replaced
with a single percent. |
| %A |
Replaced
with the event arguments. |
| %B |
Replaced
with the handle for the binding that matched the event tag. |
| %E |
Replaced
with the unique handle for the event. |
| %I |
Replaced
with the handle for the item or an empty string if the event is generated
for a map. |
| %M |
Replaced
with the handle for the map. |
| %N |
Replaced
with the event name that triggered the binding. |
| %P |
Replaced
with the pattern that matched the event tag. |
Events can trigger event
bindings, which allow executing arbitrary Tcl commands. Event bindings
are either associated with an item or with a complete map.
A binding is defined by a
pattern, which is matched against event tags. The match uses the same rules
as described for the Tcl string match command.
The body of an event binding
is a Tcl script, which is executed in global context whenever an event
tag matches the binding pattern.
Events that are associated
with a map item will first trigger all event bindings for that particular
item. Afterwards, the event will be passed to the parent item (if any).
Once the event has reached
the root item, the event will be passed to the network map. Events that
are associated with a network map will only trigger the event bindings
defined for that particular map.
The processing of event bindings
can be controlled by returning a break or continue return code from the
script.
A break return code will
stop event processing.
A continue return code will
stop event processing for the current item and immediately start with the
bindings defined for the parent item (if any) or for the whole map.
Event details can be accessed
in the script, which is bound to an event by means of % substitutions.
These substitutions happen before the script is passed to the Tcl interpreter.
|