https://wiki.multitheftauto.com/wiki/Talk:Event_system?feed=atom&action=historyTalk:Event system - Revision history2024-03-29T11:33:35ZRevision history for this page on the wikiMediaWiki 1.39.3https://wiki.multitheftauto.com/index.php?title=Talk:Event_system&diff=21045&oldid=prevEAi at 09:55, 11 August 20092009-08-11T09:55:52Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 09:55, 11 August 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Just an observation: it seems that the hidden variables (like source) persist throughout the duration of the associated event handler, including while other functions (that were called by the handler function) are being executed. This means that the hidden the variables work quite differently than do function arguments, and there is potential for errors if the user does is not aware of this fact. Perhaps the way these hidden variables work should be explained on the page - their scope and when they exist. --[[User:Erorr404|Erorr404]] 03:58, 11 August 2009 (UTC)</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Just an observation: it seems that the hidden variables (like source) persist throughout the duration of the associated event handler, including while other functions (that were called by the handler function) are being executed. This means that the hidden the variables work quite differently than do function arguments, and there is potential for errors if the user does is not aware of this fact. Perhaps the way these hidden variables work should be explained on the page - their scope and when they exist. --[[User:Erorr404|Erorr404]] 03:58, 11 August 2009 (UTC)</div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">: The so-called 'hidden' variables are global variables that are set when the event-handling function is called, and unset when the function returns. As such, as you say, their scope is across any functions called by the event-handling function. This possible is useful in some circumstances, though I'd guess it causes more issues than it solves. [[User:EAi|eAi]] 09:55, 11 August 2009 (UTC)</ins></div></td></tr>
<!-- diff cache key wiki-wiki_dev_:diff::1.12:old-21044:rev-21045 -->
</table>EAihttps://wiki.multitheftauto.com/index.php?title=Talk:Event_system&diff=21044&oldid=prevErorr404: Created page with 'Just an observation: it seems that the hidden variables (like source) persist throughout the duration of the associated event handler, including while other functions (that were …'2009-08-11T03:58:31Z<p>Created page with 'Just an observation: it seems that the hidden variables (like source) persist throughout the duration of the associated event handler, including while other functions (that were …'</p>
<p><b>New page</b></p><div>Just an observation: it seems that the hidden variables (like source) persist throughout the duration of the associated event handler, including while other functions (that were called by the handler function) are being executed. This means that the hidden the variables work quite differently than do function arguments, and there is potential for errors if the user does is not aware of this fact. Perhaps the way these hidden variables work should be explained on the page - their scope and when they exist. --[[User:Erorr404|Erorr404]] 03:58, 11 August 2009 (UTC)</div>Erorr404