## fetchEvent

### Syntax:

    fetchEvent (thisAction, thisObject);

### Purpose:

Determines whether the thisObject object type contains a thisAction event. Both thisAction and thisObject must be variables of type objectType.

### Return value:

fetchEvent returns a function handle if the specified event is found. If no event is found, the function returns FALSE.

### Example:

    objectType ego () {
    }

    objectType lookAt () {
    }

    objectType poster ("poster") {
       event lookAt {
          say (ego, "I'm looking at the poster.");
       }
    }

    sub init () {
       var a = fetchEvent (poster, lookAt);
          # Returns FALSE

       var b = fetchEvent (lookAt, poster);
          # Returns a pointer to poster.lookAt
    }

### See also:

Object Types and Events

callEvent

SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012