gmlEventSource Class Reference

Detailed Description

Clients of gmlEventSource objects can "bind" and "unbind" script to events.

All instances generate at least the Dispose event when their destructor is called.

Public Member Functions

constructor args

An event source generates events on which other objects can bind callback scripts.

args
is the list of event names that this object can generate.

destructor

Releases the resources of the gmlEventSource object.

event subcmd args

Usage:

objName event add|remove event ?event...?

bind args

Usage:

objName bind ?``event`` ?``script``??

With no parameters, returns the list of event names on which objects can bind callbacks. With one argument, returns the list of callbacks bound to this event name. With two arguments, bind the script to this event name.

unbind args

Usage:

objName unbind ?``event`` ?``script``??

If event and script are specified, remove the callback script bound to the event event; it is not an error if the script was not bound. If only event is specified, remove all callbacks bound to that event. If neither are specified, remove all callbacks bound to this object.

invoke event args

Evaluate all the scripts bound to the event event, passing args as the list of arguments to these scripts. Any script that generates an error is unbound from the event.