Download Description

Transcript
GroupKit Reference - gk::environment
Specify a list of routings for this command, or
return the current list of routings. Routings are
used by shared environments to control how
environment messages are distributed among
processes.
envName addDependent key process ?type?
For shared environments, the "addDependent" command provides a
mechanism to specify that a particular node in the environment is
dependent on the existence of a GroupKit process, and that when
that process goes away, the corresponding node should be deleted.
The optional type specifies whether the node is part of the "data"
hierarchy, or the "option" hierarchy.
Event Bindings
Environments generate events when nodes are changed. These are similar
to those generated by the gk::event command, but environment events are
intercepted by the bind environment command.
When a node is added to the environment, an "addEnvInfo" event is
generated. Its parameter is "%K" specifying the key of the node that is
added. When an existing node is changed, a "changeEnvInfo" event is
generated, again with a "%K" parameter. When a node is deleted, a
"deleteEnvInfo" is generated, again with a "%K".
As well, a second event is generated, named after the node affected. For
example if you add a node "users.3.color", an event named "users.3.color"
will be generated. This allows you to bind on particular nodes. Remember
also that event bindings support wildcards, so you could bind on
"users.*.color". This feature lets you design bindings without worrying
about a lot of parsing code to determine if you have the right event. For
these types of events, parameters are "%K" (the key), "%V" (the value at
the key), "%P" (the previous value), "%O" (the operation; one of
addEnvInfo, changeEnvInfo or deleteEnvInfo) and "%1" through "%9"
for each dot separated component of the key (e.g. "%3" would be "color"
in the example).
GroupKit Reference Manual. Last updated May 13, 1998 by Mark Roseman.
file:///Paris/groupkit-5.1/doc/environment.html (4 of 4) [12/10/2000 10:39:23 PM]