• 0

    posted a message on Mark bag items
    Unless each one is different, you should be able to call :GetScript() on one frame that you know has the right function to store before iterating and comparing.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Mark bag items
    You can use EnumerateFrames to iterate through every frame in the current UI and check for the presence of that function in the frame's OnLoad event handler.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Packager issues
    What exactly did he do that you told him not to do? Though our problems sound similar, I know our situations are not the same. In my case I made a new Git repository on a new addon, and in his he used an external Git repository from what I can only assume was some sort of WowAce-hosted repository.
    Posted in: General Chat
  • 0

    posted a message on Packager issues
    I did see you mention your problem in IRC a few times, so it's good to know that I'm not the only one dealing with this. For the time being I just changed it to an Subversion repo until things are fixed, though I don't really know how to tell when they are.
    Posted in: General Chat
  • 0

    posted a message on Packager issues
    This is the first project that I am using Git for, and I believe I have followed everything in the wiki. When I initially pushed my repository to WowAce, I did not see any commits, even though I have it set to package Alpha, Beta, and Release. I proceeded to add a "v1" tag and pushed that, and still nothing. I switched directories and cloned just to be sure, and everything was in place, including the tag.

    So after a few more commits and still nothing, I asked around IRC and vhaarr mentioned tagging which got me thinking that I should try the web interface to see what would happen. I entered "v2" and submitted, and seconds later my v1, v1-nolib, and only the v2-nolib were packaged. I have since deleted the v1, as I had forgotten the .pkgmeta file back then, but I am still very confused with this right now.

    Where did my v2 (without the -nolib) go? Why isn't the packager detecting my commits?

    The addon can be found here:
    http://www.wowace.com/addons/balerochealers/
    Posted in: General Chat
  • 0

    posted a message on FindGlobals mystery
    Quote from Torhal
    In loops, this can speed lookups up quite considerably when you consider that Lua must first FIND "_G" and THEN perform a table lookup within it to find the appropriate member. When it's an upvalue, its address is already known, so the query is relegated to a single table lookup.


    Does this only apply if you are actually referring to the variable as an index of _G? For example:

    local _G = getfenv(0)
    print() -- GETGLOBAL
    _G["print"]() -- GETTABLE
    
    Posted in: Lua Code Discussion
  • 0

    posted a message on Library to create Interface Options widgets (checkboxes, dropdowns, textboxes, etc.)?
    I think the easiest way to learn by example is to find an addon you already have with a rather basic configuration and open up the source to see how they lay their options table out. I've learned a few tricks that way myself.
    Posted in: Lua Code Discussion
  • 0

    posted a message on table index is nil error
    Quote from myrroddin
    Interesting. I got "empty result" as my result. I take it that means it isn't translating properly, rather than a load error? I would think it would give a different error if that were the case.

    ... I wonder what is wrong with LibBabble-DigSites-3.0 then?!?


    Right. If the library didn't load, it would give you a Lua error. You can also try other digsites with names that you know just to confirm. If at least one of them is translating, make sure that the version that you have on your hard drive is the latest one.
    Posted in: Lua Code Discussion
  • 0

    posted a message on table index is nil error
    Try this in game:

    /dump LibStub("LibBabble-DigSites-3.0")["Aerie Peak Digsite"]
    Posted in: Lua Code Discussion
  • 0

    posted a message on On*event* cycle increased?
    Could this have anything to do with the new "Optimize Network for Speed"? Though I didn't see the details, I imagined it would fire off information more rapidly instead of sending it in chunks.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Scale animations bugging fontstrings?
    I've seen this problem in SexyCooldowns intermittently for a while now, but I have never had a clue what caused it. Sometimes text would get enormous. Like so big, that you can see the pixels clearly. It suddenly became reproducible after 4.1, and OmniCC's pulse feature had the same thing, so I was able to write up some code to demonstrate the problem. The commented parts are things that I thought were affecting the bug, but apparently it is much more simple to reproduce than I thought. Am I missing something, or is this a bug in the client?

    local f = CreateFrame("frame")
    f:SetSize(50, 50)
    f:SetPoint("CENTER")
    f:SetScript("OnMouseUp", function()
    	f.finish:Play()
    	f:SetScript("OnMouseUp", nil)
    end)
    
    f.s = f:CreateFontString(nil, nil, "SystemFont_Outline_Small")
    f.s:SetText("Test")
    f.s:SetPoint("CENTER")
    
    f.t = f:CreateTexture()
    f.t:SetTexture(0, 0, 0)
    f.t:SetAlpha(0.5)
    f.t:SetAllPoints()
    
    f.finish = f:CreateAnimationGroup()
    
    -- f.finishAlpha = f.finish:CreateAnimation("Alpha")
    -- f.finishAlpha:SetChange(-1)
    -- f.finishAlpha:SetDuration(.85)
    
    f.finishScale = f.finish:CreateAnimation("Scale")
    f.finishScale:SetScale(2, 2)
    f.finishScale:SetDuration(.85)
    
    f.finish:SetScript("OnPlay", function()
    	-- f.s:Hide()
    end)
    f.finish:SetScript("OnFinished", function()
    	-- f.s:Show()
    	local t = GetTime()
    	f:SetScript("OnUpdate", function()
    		if GetTime()-t > 0.5 then
    			f.finish:Play()
    			f:SetScript("OnUpdate", nil)
    		end
    	end)
    end)
    
    Posted in: Lua Code Discussion
  • 0

    posted a message on New to Lua, stumped on slash command
    You can use EditMacro to change a macro, so you type /gettank once and then use the macro that it generates from there on out. The only drawback is that you can only use EditMacro out of combat.

    Edit: I am officially the worst reader in the world. Sorry.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Finding What Zone I'm In (ID Based?)
    I actually was in the same situation myself, and I made a table mapping Wowhead zone ids to the id returned by GetCurrentMapAreaID(). Here is the table if you can make use of it, but note that it does not include dungeons.

    -- [wowhead_id] = ingame_id,
    zidmap = {
       [1] = 27,
       [3] = 17,
       [4] = 19,
       [8] = 38,
       [10] = 34,
       [11] = 40,
       [12] = 30,
       [14] = 4,
       [15] = 141,
       [16] = 181,
       [17] = 11,
       [28] = 22,
       [33] = 37,
       [38] = 35,
       [40] = 39,
       [41] = 32,
       [44] = 36,
       [45] = 16,
       [46] = 29,
       [47] = 26,
       [51] = 28,
       [65] = 488,
       [66] = 496,
       [67] = 495,
       [85] = 20,
       [130] = 21,
       [139] = 23,
       [141] = 41,
       [148] = 42,
       [210] = 492,
       [215] = 9,
       [267] = 24,
       [331] = 43,
       [357] = 121,
       [361] = 182,
       [394] = 490,
       [400] = 61,
       [405] = 101,
       [406] = 81,
       [440] = 161,
       [490] = 201,
       [493] = 241,
       [495] = 491,
       [616] = 606,
       [618] = 281,
       [1377] = 261,
       [1497] = 382,
       [1519] = 301,
       [1537] = 341,
       [1637] = 321,
       [1638] = 362,
       [1657] = 381,
       [3430] = 462,
       [3433] = 463,
       [3483] = 465,
       [3487] = 480,
       [3518] = 477,
       [3519] = 478,
       [3520] = 473,
       [3521] = 467,
       [3522] = 475,
       [3523] = 479,
       [3524] = 464,
       [3525] = 476,
       [3537] = 486,
       [3557] = 471,
       [3703] = 481,
       [3711] = 493,
       [4080] = 499,
       [4197] = 501,
       [4395] = 504,
       [4709] = 607,
       [4714] = 545,
       [4720] = 544,
       [4737] = 605,
       [4755] = 611,
       [4815] = 610,
       [4922] = 700,
       [5034] = 720,
       [5042] = 640,
       [5095] = 708,
       [5144] = 615,
       [5145] = 614,
       [5146] = 613,
       [5287] = 673,
       [5339] = 689,
       [5416] = 737,
       [5630] = 737,
       [5695] = 772,
    }
    Posted in: Lua Code Discussion
  • 0

    posted a message on QuestHubber Help!
    Oh, the simple answer to why that isn't in the addon is because they were added before Cataclysm, which means my Wowhead filter never picked them up. I'll add them to my crawler and have a new revision with those quests in soon.

    Edit: r19 should have the data you need
    Posted in: AddOn HELP!
  • 0

    posted a message on QuestHubber Help!
    Update: I know I should have checked this immediately, but I finally had a guild member have a problem with the addon as well, and I worked with him and realized that one of the libraries wasn't included in the .toc file. So, everyone else that had Ace addons had no trouble. r18 should be working for you now if it still wasn't before.
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.