Event System User's Document

Steve A Fink

1 How to use it

You do one of the following events from a Fcl with the event system compiled into it:

1. event register <event name> <command>

Tells the event system you want to receive events named <event name>, and to execute the command whenever you receive them. For example,

event register startup {eval exec $eventArgs &}

would cause you to execute whatever was passed to you in the event's arguments whenever you receive an event named `startup'.

2. event unregister <event name>

Stops listening for events with the given name

3. event broadcast <event name> ?event arguments?

Sends an event to all processes registered for that event. For example,

event broadcast startup ``gnu-emacs /etc/passwd''

would broadcast the event named ``startup'' with the argument ``emacs /etc/passwd''. If a process had executed the command listed in section1 to register for the startup event, this would cause gnu-emacs to display the file /etc/passwd in the background.

4. event info ?event name?

Without any arguments, this command displays all the events that you are registered for. With an argument, it displays the command that will be executed when you receive the named event. With two arguments, it displays a usage message. With three arguments, it displays a usage message. With four argu... time's up, I'm outta here.

Sorry about the brevity. I'm a bit rushed.

Last Modified: 11:18am EST, February 23, 1996