• 0

    posted a message on Explaining this SetScript to an idiot.
    Unless you're interested in making your own libraries you don't really know how LibStub works in detail. All you need to know is that most libraries use LibStub in turn, so if your addon is using some library, more than likely you will need to get LibStub as well.

    Take a look at these links for learning how you can make an LDB object:
    https://github.com/tekkub/libdatabroker-1-1/wiki/How-to-provide-a-dataobject
    https://github.com/tekkub/libdatabroker-1-1/wiki/Data-Specifications

    I don't believe the tooltip:Show() should be necessary as the display should handle that. The example in one of the links support that at least, and I guess that's probably where I got it from.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Explaining this SetScript to an idiot.
    The Titan Panel API is horrible, imo. I highly recommend that you have a look at LibDataBroker. It's essentially a different way of making plugins that's much easier, and will also work with a lot of Broker display addons. (panel addons, if you will)

    Here's an example of a simple "plugin":
    local plugin = LibStub("LibDataBroker-1.1"):NewDataObject(addonName, {
        type = "data source",
        text = "Not AFK",
        icon = [[Interface\Icons\Spell_Nature_TimeStop]],
        label = "AFK Timer",
        OnClick = function(self, button)
            if button == "LeftButton" then
                SendChatMessage("", "AFK")
            elseif button == "RightButton" then
                EasyMenu(dropdown, addon, self, 0, 0, "MENU")
            end
        end,
        OnTooltipShow = function(self)
            self:AddLine("Broker: AFKTimer", HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b)
            self:AddLine(" ")
            self:AddLine(db.note and "You are AFK: |cffffffff"..db.note or "You are not AFK.")
            self:AddLine(" ")
            self:AddLine("Left-click to toggle AFK status.", GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b)
        end,
    })

    Whenever you want to change the text or icon, simply do:
    plugin.icon = "new\\icon"
    plugin.text = "new text too"

    I understand if you want to stick with what you already are familiar, of course! Also could've explained better, but I'm tired!
    Posted in: Lua Code Discussion
  • 0

    posted a message on DataStore
    Alright, I went ahead to do so, and while I were able to commit some small fixes, it wouldn't let me tag. TortoiseSVN gives me Access denied. Tried both public and dev URL. Is this intended? Should ask elsewhere I suppose. The option to do it directly from the project site is not available to me.
    Posted in: Libraries
  • 0

    posted a message on Recount
    As far as I understood, unit GUIDs are always strings because WoW can't handle 64-bit yada yada, and so you wouldn't be to apply a mask?
    Posted in: General AddOns
  • 0

    posted a message on DataStore
    Well, as far as I can tell the required-dependencies is the only solution that really works. (as long as the Curse client is used) It does work, right? Won't remove the dependencies if another addon that uses them is removed?

    But the alpha thing won't really work. All the repos are open; would it be frowned upon to tag them so the up-to-date files can be installed via dependencies? As far as I can tell the alphas are perfectly stable and used in Altoholic, while the tags are, in some (all?) cases, several years old.
    Posted in: Libraries
  • 0

    posted a message on Recount
    By a coincidence I discovered that I need to do guid:sub(6, 10) (and not 7) to encompass all the creature ID bits. I checked with some other addons and noticed that Recount is using 7 too in at least one place.

    Recount\Tracker.lua:387
    function Recount.IsBoss(GUID)
       return GUID and bossIDs[tonumber(GUID:sub(7, 10), 16)]
    end

    Might this be a/the reason the saved encounter menu often doesn't work properly?
    Posted in: General AddOns
  • 0

    posted a message on DataStore
    I see. That is unfortunate.

    The empty pointer addons seemed like a nice solution.
    Posted in: Libraries
  • 0

    posted a message on :Click and /click accepts any button argument
    I just now noticed that I can pass any string or number I want (as opposed to one that matches the name of a mouse button) as the mouse button argument to both :Click() and /click, and it will get passed along to all sorts of click handler as the button parameter.

    Is this a known and/or intended behaviour? It seems weird, but it allows my users to pass an intuitive argument to /click commands to perform different actions.

    /click MyButton doThis
    /click MyButton doThat
    Posted in: Lua Code Discussion
  • 0

    posted a message on DataStore
    Hoping this bump isn't considered inappropriate as I think it's highly related..

    So I'm in need of bundling DataStore. Is there a preferred method after all these years? I was going to go with required-dependencies, but I need the latest alpha as they are updated and stable while releases are way out of date. The client won't install an alpha version, will it?
    Posted in: Libraries
  • 0

    posted a message on Weak Auras 2 does not work
    There was an explanation here:
    http://www.curse.com/addons/wow/weakauras?page=2#c997
    Posted in: AddOn HELP!
  • 0

    posted a message on Grid — compact party/raid unit frames
    I don't use these options and I don't really care either way, but if anything I think it seems better not to arbitrarily merge text statuses.

    Also, in case you don't get auto notified, I submitted a simple ticket for GridStatusParty.
    http://www.wowace.com/addons/grid-status-party/tickets/4-leader-icon-missing/
    Posted in: Grid & Grid2
  • 0

    posted a message on SetBlingDuration doesn't work
    The Wowpedia page does mention this:
    This function only has an effect if the cooldown widget is currently playing the bling animation.

    which I'm guessing is the issue. Sounds so from the solution you came up with, too.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Grid — compact party/raid unit frames
    I have all my debuff statuses set to show only dispellable, and for example the poison status activate when someone gets poisoned, but I can never dispel poisons as a priest. As far as I remember, Mass Dispel was implemented in the debuff statuses being able to dispel all debuff types.
    Posted in: Grid & Grid2
  • 0

    posted a message on Grid — compact party/raid unit frames
    Mass Dispel is not implemented correctly as far as the debuff statuses go. It only does magic-type debuffs, regardless of spec.
    Posted in: Grid & Grid2
  • 0

    posted a message on Recount
    Just returned from a short period of trying Skada, and one handy thing it's got is raid damage taken by spell. That is, the main view shows the sources of damage for the entire raid, not per player. In detailed view you could see who took the damage from each spell. Would this be "hard" to implement, or is there a plugin for it or something?
    Posted in: General AddOns
  • To post a comment, please or register a new account.