• 0

    posted a message on Issue Hiding a Frame
    Quote from upyursh
    I'm basically wanting to redraw the frame and its widgets. Should I actually just destroy it (if so how would I do that) or is what I've got good enough?

    I imagine my current method will just keep on drawing over and over so when the frame is opened it will actually have many objects one over the top of eachother?


    A frame once created, can be shown or hidden. It is always there, and cannot be destroyed, shown means the user will actually see it, while hidden means the user won't. In both cases, whether shown or hidden, the frame will still respond to registered events.

    If you created a 2nd frame and hide the 1st, then all you would be exactly that. If you then create and show a 3rd frame and hide the 2nd, you will now have 2 hidden frames and 1 shown frame. This goes on until you run out of memory as more and more frames get created and WoW crashes. You want to avoid this by using the same frame by showing/hiding it.

    If you just want one frame to display to the user, then create it directly outside of any function near the top of your addon, that ensures its available to the rest of your addon. No need to use a function to create the frame unless you actually want to delay the creation of the frame to a later time for a specific reason.
    Posted in: Need Help?
  • 0

    posted a message on Issue Hiding a Frame
    Quote from upyursh
    Yeah that's why I'm trying to check on the frame and Hide() it first

    Hiding the frame doesn't destroy the frame. The code you have above still continues to create a frame after the check anyway.
    Posted in: Need Help?
  • 0

    posted a message on Recount
    Ok, that would explain why the compat code didn't work. I assumed it will be 40100. I made another commit for the compat code.
    Posted in: General AddOns
  • 0

    posted a message on Issue Hiding a Frame
    You'll also want to make sure you never call this function more than once, or you will be creating more and more and more frames. Unless you add checks of course.
    Posted in: Need Help?
  • 0

    posted a message on Recount
    Please do something for me Galvin, go to the PTR and type /dump GetBuildInfo() and tell us what it says exactly. I am unable to get on the PTR servers.

    In fact anyone who was in the closed beta for Cata is unable to get on the PTR servers as the accounts are flagged in such a way that the realm selection lists are always empty, so don't expect most addons to be fixed for 4.1 before it hits. This is really problematic because all addons that use the combat log are broken in 4.1.
    Posted in: General AddOns
  • 0

    posted a message on Event fire and addon table
    Read this page on the use of "self": http://www.lua.org/pil/16.html
    Posted in: Need Help?
  • 0

    posted a message on no lib strip and addons
    Tools-used is just to give credit to the author(s) of any additional tools you used (so they get curse points), it doesn't affect your zip in any way.
    Posted in: AddOn HELP!
  • 0

    posted a message on Recount
    Quote from Elsia
    Sure thing, if someone got the time.

    Done. Added a backwards compat tail call (it just inserts a dummy argument) because I didn't want to deal with shifting arguments with "...". The tail call overhead will only be used on wow live servers, so performance-wise, it will only affect people who use alpha code on live servers.
    Posted in: General AddOns
  • 0

    posted a message on no lib strip and addons
    Every addon you look at has CBH and Libstub stripped. This is simply because if the user chose a no-lib installation, then Ace3 would be installed disembedded. Ace3 itself is a package of libraries that contains and uses both LibStub and CBH. Thus, the main addon doesn't need to include them.

    If an addon (or library) is using CBH or LibStub directly, without using Ace3, then yes, they cannot be stripped.

    Thus your TOC should have CBH and libstub moved into the strip, something like what Omen does here:

    ## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, LibSink-2.0, LibDBIcon-1.0, !ClassColors
    
    #@no-lib-strip@
    Libs\LibStub\LibStub.lua
    Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
    Libs\AceAddon-3.0\AceAddon-3.0.xml
    Libs\AceGUI-3.0\AceGUI-3.0.xml
    Libs\AceConfig-3.0\AceConfig-3.0.xml
    Libs\AceConsole-3.0\AceConsole-3.0.xml
    Libs\AceDB-3.0\AceDB-3.0.xml
    Libs\AceEvent-3.0\AceEvent-3.0.xml
    Libs\AceLocale-3.0\AceLocale-3.0.xml
    Libs\AceTimer-3.0\AceTimer-3.0.xml
    Libs\AceDBOptions-3.0\AceDBOptions-3.0.xml
    Libs\LibSharedMedia-3.0\lib.xml
    Libs\AceGUI-3.0-SharedMediaWidgets\widget.xml
    Libs\LibSink-2.0\lib.xml
    #@end-no-lib-strip@
    Libs\LibDataBroker-1.1\LibDataBroker-1.1.lua
    #@no-lib-strip@
    Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua
    #@end-no-lib-strip@
    Due to library load ordering, you'll see LDB is not stripped in the middle there. The usage of the "Libs" subfolder for all the libraries that an addon uses is just a convention, I see you haven't used them in your TOC.
    Posted in: AddOn HELP!
  • 0

    posted a message on LibRaidRole - Make role specific functions easier
    Here's my question though.

    How many addons would actually use this library simultaneously? My intuition is that if 2 addons will never be installed together that simultaneously uses a library, then it shouldn't be a library in the first place and should be addon-specific code.

    Right now, I don't see why a user would require 2 addons that sets his role.
    Posted in: Libraries
  • 0

    posted a message on Addons getting Inactive status
    Oh, I received 18 emails about 9 addons going inactive... 9 per email address.
    Posted in: General Chat
  • 0

    posted a message on Recount
    Elsia, its just an extra argument before the vararg list. Want someone to just add a compat check and shift arguments?
    Posted in: General AddOns
  • 0

    posted a message on LibRaidRole - Make role specific functions easier
    For the library to upgrade properly, the local frame "f" needs to be stored under the library table to be reused.
    Posted in: Libraries
  • 0

    posted a message on Mana regen graph
    From that addon description, it sounds like you already have everything worked out, so the only thing that remains is to actually code the addon.

    I don't see anything in the description that is undoable, and you have even gone to the extent of defining limits (the lower limit of 0.2s updates) and optional user-setting behaviors.

    Basically, like you said, you just need to record the user's difference in mana every X seconds into a table, and take the average of the last M values stored in the table for the pendulum display. Sounds simple? It is.

    The entire saved data could be used for graphing after the fight, or you could just ditch the oldest value as you record the newest value if you don't intend to do that.
    Posted in: Addon Ideas
  • 0

    posted a message on Frame alpha with multiple textures
    Quote from Beautiuz
    Thats why I want to provide then in an separated addon and not override the default ones. I can maintain the directory structure inside the icon addon so that if you have an icon that you just can append a patch to the start of the icon path and that it will work.


    Well, for addons to use it, you would need each addon to manually support and use it. Equally problematic. It's not a clean solution, but still a solution nontheless.
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.