View Single Post
09-08-10, 09:38 PM   #3
IQgryn
A Cyclonian
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 46
Originally Posted by Tiok View Post
Dealing with the Loss of "arg#"
"arg#", the event argument globals, were used with almost every single event handler function. Now that they're no longer global, it seems that you have to pass them to your event handlers manually... but where do you get them from in the first place? Especially, how do you get access to event arguments inside the XML-defined OnEvent handler, so you can pass them through?
I believe the event handlers have all been converted to use ... instead of specific argument variables. You can emulate the old behavior by putting the following code at the beginning of your event handlers:
Code:
local arg1, arg2, arg3 = ...
(Add or subtract variables as necessary for each handler). You could of course use better names for each handler, which will require more work but be much easier to read later on.