1. #1

    OnUpdate handler

    My addon used this construction

    XML file:

    <Scripts>
    <OnUpdate>
    MyAddon_OnUpdate(arg1);
    </OnUpdate>
    </Scripts>


    Lua file:

    function MyAddon_OnUpdate(Elapsed)
    MyAddon_TimeSinceLastUpdate = MyAddon_TimeSinceLastUpdate+Elapsed;
    ...
    end


    This however does not work anymore, how should I change it so that it works?
    Quote Originally Posted by Xhosas
    Why do ppl thing that dodge isnt good in ICC? i mean if u have alot 25 bananas and 25 oranges and someone steals u 20 bananas, what will u do, buy back some bananas or buy more oranges?

  2. #2
    Deleted
    Why don't you just use SetScript?

    frame:SetScript("OnUpdate", MyAddon_OnUpdate).

    function MyAddon_OnUpdate(self, Elapsed)

  3. #3
    That does indeed work it appears to be the same as doing(As in they renamed arg1 to elapsed);

    <OnUpdate>
    MyAddon_OnUpdate(elapsed);
    </OnUpdate>
    Quote Originally Posted by Xhosas
    Why do ppl thing that dodge isnt good in ICC? i mean if u have alot 25 bananas and 25 oranges and someone steals u 20 bananas, what will u do, buy back some bananas or buy more oranges?

  4. #4
    Deleted
    Should be. I just don't like XML files.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •