fetchEvent (thisAction, thisObject);
Determines whether the thisObject object type contains a thisAction event. Both thisAction and thisObject must be variables of type objectType.
fetchEvent returns a function handle if the specified event is found. If no event is found, the function returns FALSE.
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 }
SLUDGE and this SLUDGE documentation are copyright Hungry Software and contributors 2000-2012