1. CL_Fix - Combat Log fix

    Hello there!

    I was fed up having to use a macro to clear my combat log all the time to "fix" my damage meter, so I made a very simple addon that does it for me.
    It saves me a actionbar slot and the hassle to even click the macro.

    You can download the addon in the link below:
    https://www.mediafire.com/?xd53775sfw0h5s0

    You can change the timer in the CL_Fix.lua file, there is no /-command (didnt bother :p)

  2. While there are already some AddOns to fix this issue, you did a nice job.

    Wise use of a OnUpdate throttle and clean code.

  3. While there are already some AddOns to fix this issue, you did a nice job.

    Wise use of a OnUpdate throttle and clean code.
    Thanks mate, appreciated!
    I'm kinda new to Lua programming, you wouldn't happen to know any good sites that are more in-depth in how the WoW UI works? :)

  4. I'm kinda new to Lua programming, you wouldn't happen to know any good sites that are more in-depth in how the WoW UI works? :)
    There is a book called "World of Warcraft Programming". If you are interested exactly in UI then it's the best resource I found. The book has over 1000 pages and it has many examples and explanations.

    There is also a site related to the book ( http://wowprogramming.com/ ) and Wowwiki has some useful information ( http://wowwiki.wikia.com/wiki/WoW_AddOn ) but those focus more on WoW Lua API not on UI.

  5. There is a book called "World of Warcraft Programming". If you are interested exactly in UI then it's the best resource I found. The book has over 1000 pages and it has many examples and explanations.

    There is also a site related to the book ( http://wowprogramming.com/ ) and Wowwiki has some useful information ( http://wowwiki.wikia.com/wiki/WoW_AddOn ) but those focus more on WoW Lua API not on UI.
    Thanks alot!
    Gotta get my hands on that book now :D


  6. Is there a certain point in uploading a copy of CombatLogFix by Shadowed to GitHub?


    @ gmadtehm4d :

    Actually, I wouldn't recommend that book a lot these days because it quite some money and some parts of it are a bit dated.
    (e.g., you wouldn't use .xml anymore except for library inclusion and SecureFrame templates)

    But on the other hand it's a good start and James(aka. Cladhaire) is one of the nicest persons I worked with since Classic/TBC.

  7. Is there a certain point in uploading a copy of CombatLogFix by Shadowed to GitHub?
    I'm not an author
    And this is a completely different code

  8. I'm not an author
    And this is a completely different code
    I was asking because the one in the Git is an exact copy of the original by Shadowed

    APART from the first line

    original:
    Code:
    local LogFixer = select(2, ...)
    (using the local table each AddOns gets provided by the Client)

    Git version:
    Code:
    local LogFixer = CreateFrame("Frame", "DEFAULT_CHAT_FRAME", UIParent);
    Creating an unneeded frame that is named after a global variable that is used by the chat system...
    A really foolish thing to do.
    .

    TL,DR:
    Basically the Git version is just a copy with a line modified that can potencially screw the chat system and any AddOn that wants to utilize the global variable DEFAULT_CHAT_FRAME before it is updated by the chat system.
    Edited: June 29, 2017

  9. I was asking because the one in the Git is an exact copy of the original by Shadowed

    APART from the first line

    original:
    Code:
    local LogFixer = select(2, ...)
    (using the local table each AddOns gets provided by the Client)

    Git version:
    Code:
    local LogFixer = CreateFrame("Frame", "DEFAULT_CHAT_FRAME", UIParent);
    Creating an unneeded frame that is named after a global variable that is used by the chat system...
    A really foolish thing to do.
    .

    TL,DR:
    Basically the Git version is just a copy with a line modified to screw the chat system and any AddOn that wants to utilize the global variable DEFAULT_CHAT_FRAME.
    Code:
    local LogFixer = select(2, ...)
    Doesn't work in TBC. You don't get global enviroment variables.
    In 2012, I just took Shadowed's version and tried to make it compatible with TBC. I logged what the first line of code actually did on a 3.3.5 server and replicated it to the best of my (back then) ability.

    It also doesn't actually mess up DEFAULT_CHAT_FRAME, it inherits from it, iirc

  10. Code:
    local LogFixer = select(2, ...)
    Doesn't work in TBC. You don't get global enviroment variables.
    In 2012, I just took Shadowed's version and tried to make it compatible with TBC. I logged what the first line of code actually did on a 3.3.5 server and replicated it to the best of my (back then) ability.

    It also doesn't actually mess up DEFAULT_CHAT_FRAME, it inherits from it, iirc
    The local addon name and table might not exists in TBC, but the only thing you need to do is to change it to
    Code:
    local LogFixer = {}
    to have a local table.
    Or you can create the frame at the beginning instead of line 99 and point to it, e.g. by
    Code:
    local LogFixer = CreateFrame("Frame")
    local frame, instanceType, lastEvent = LogFixer
    - - and comment out / delete line 99 ( frame = CreateFrame("Frame") )

    It also doesn't actually mess up DEFAULT_CHAT_FRAME, it inherits from it, iirc
    1. The second argument to CreateFrame is name,
    Code:
    frame = CreateFrame("frameType" [, "name" [, parent [, "template"]]]
    http://wowprogramming.com/docs/api/CreateFrame

    2. Why would you inherit a simple table or event frame from a ChatFrame? It a totally different type of frame.
    (And DEFAULT_CHAT_FRAME is a global ChatFrame variable that is provided for AddOns to output in/get the current default chat frame and you should never interfere in such a way with default variables and frames).

    In 2012, I just took Shadowed's version and tried to make it compatible with TBC. I logged what the first line of code actually did on a 3.3.5 server and replicated it to the best of my (back then) ability.
    I did not intend to speak down on you in any way.
    It's just that the approach is 'amateurish' and way to complex. (Which I do understand as this was actually an amateur giving it a try.
    Which I appreciate. It's just not the right way.)

    I don't want to be harsh on you, I want to point out unnecessary or possibly harmful coding practices / errors.

    All I'm saying is: Change it to the proper way, please.

    You contributions are appreciated a lot!
    Edited: June 29, 2017

  11. The local addon name and table might not exists in TBC, but the only thing you need to do is to change it to
    Code:
    local LogFixer = {}
    to have a local table.
    Or you can create the frame at the beginning instead of line 99 and point to it, e.g. by
    Code:
    local LogFixer = CreateFrame("Frame")
    local frame, instanceType, lastEvent = LogFixer
    - - and comment out / delete line 99 ( frame = CreateFrame("Frame") )

    1. The second argument to CreateFrame is name,
    Code:
    frame = CreateFrame("frameType" [, "name" [, parent [, "template"]]]
    http://wowprogramming.com/docs/api/CreateFrame

    2. Why would you inherit a simple table or event frame from a ChatFrame? It a totally different type of frame.
    (And DEFAULT_CHAT_FRAME is a global ChatFrame variable that is provided for AddOns to output in/get the current default chat frame and you should never interfere in such a way with default variables and frames).

    I did not intend to speak down on you in any way.
    It's just that the approach is 'amateurish' and way to complex. (Which I do understand as this was actually an amateur giving it a try.
    Which I appreciate. It's just not the right way.)

    I don't want to be harsh on you, I want to point out unnecessary or possibly harmful coding practices / errors.

    All I'm saying is: Change it to the proper way, please.

    You contributions are appreciated a lot!
    Make a pull request at his repo with the right changes then :)

Posting Permissions

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