RemoveEventHandler: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
__NOTOC__
{{Server client function}}
{{Server client function}}
{{Needs_Checking|Why do we have to specify what element was the handler attached to? --[[User:Jbeta|jbeta]] 07:34, 3 June 2007 (CDT)
*Because multiple elements might use the same event and function --[[User:Kevuwk|Kevuwk]] 20:49, 22 June 2007 (CDT) }}
__NOTOC__
This functions removes a handler function from an [[event]], so that the function is not called anymore when the event is triggered. See [[event system]] for more information on how the event system works.
This functions removes a handler function from an [[event]], so that the function is not called anymore when the event is triggered. See [[event system]] for more information on how the event system works.



Revision as of 13:27, 23 August 2007

This functions removes a handler function from an event, so that the function is not called anymore when the event is triggered. See event system for more information on how the event system works.

Syntax

bool removeEventHandler ( string eventName, element attachedTo, function functionName ) 

Required Arguments

  • eventName: The name of the event you want to detach the handler function from.
  • attachedTo: The element the handler was attached to.
  • functionName: The handler function that was attached.

Returns

Returns true if the event handler was removed successfully. Returns false if the specified event handler could not be found or invalid parameters were passed.

Example

See Also