RemoveEventHandler: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
{{Needs_Checking|Why do we have to specify what element was the handler attached to? --[[User:Jbeta|jbeta]] 07:34, 3 June 2007 (CDT)}}
__NOTOC__  
__NOTOC__  
This fake function is for use with blah & blah and does blahblahblabhalbhl
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==  
==Syntax==  
Line 8: Line 9:


===Required Arguments===  
===Required Arguments===  
*'''argumentName:''' description
*'''eventName:''' The name of the [[event]] you want to detach the handler function from.
 
*'''attachedTo:''' The [[element]] the handler was attached to.
===Optional Arguments===
*'''functionName:''' The name of the handler function that was attached.
{{OptionalArg}}
*'''argumentName2:''' description
*'''argumentName3:''' description


===Returns===
===Returns===
Returns ''true'' if blah, ''false'' otherwise.
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==  
==Example==
This example does...
This example...
<syntaxhighlight lang="lua">
--This line does...
blabhalbalhb --abababa
--This line does this...
mooo
</syntaxhighlight>


==See Also==
==See Also==
{{Event_functions}}
{{Event_functions}}
[[Category:Incomplete]]

Revision as of 12:34, 3 June 2007

Dialog-information.png This article needs checking.

Reason(s): Why do we have to specify what element was the handler attached to? --jbeta 07:34, 3 June 2007 (CDT)

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, string 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 name of 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

This example...

See Also