• 0

    posted a message on PitBull 4.0
    Will PB4 be implementing a group for the boss frames that were introduced in ~3.3? For example the ones that pop up in add intensive fights or where the health you're interested in is non-standard (gunship).

    Thanks for a great addon,
    Dan.

    EDIT: It's already discussed here: http://www.wowace.com/addons/pitbull4/tickets/623-frames-for-boss1-boss4-unit-ids-in-patch-3-3-0/
    Posted in: Unit Frames
  • 0

    posted a message on Blizzard's beta interface
    Ah right, I thought that the Addon Toolkit was a static download of the files and not an extractor, so to speak.
    Good to know, thanks.
    Posted in: Need Help?
  • 0

    posted a message on Blizzard's beta interface
    Great, thank you :)

    Out of curiosity, how does he get it?
    Dan.
    Posted in: Need Help?
  • 0

    posted a message on Blizzard's beta interface
    Hi all,

    Does anyone know if the Blizzard interface will be up on wowcompares at any point? Or is there a way of extracting it ourselves?

    Thanks,
    Dan.
    Posted in: Need Help?
  • 0

    posted a message on Grid2 - What it is, and what it's not
    Is (could it be) possible to add a couple of options to, e.g., groupFilter to include Focus and Target of Target frames? For example:

    Grid2Layout:AddLayout(L["By Group 10 w/Tanks+Focus+ToT"], {
        meta = {
            raid10 = true,
        },
        defaults = {
            groupingOrder = DEFAULT_GROUP_ORDER,
            allowVehicleTarget = true,
            showPlayer = true,
            showParty = true,
            showRaid = true,
        },
        [1] = {
            groupFilter = "MAINTANK,MAINASSIST, FOCUS, TARGETTARGET",
            groupingOrder = "MAINTANK,MAINASSIST, FOCUS, TARGETTARGET",
        },
        [2] = {
            type = "spacer",
        },
        [3] = {
            groupFilter = "1",
        },
        [4] = {
            groupFilter = "2",
        },
    })


    EDIT: Discovered it can't: see Blizzard's SecureTemplates.lua.
    Posted in: Grid & Grid2
  • 0

    posted a message on ZOMGBuffs Official Thread
    Hi Zeksie,

    Thanks for a brilliant addon, this is a thoroughly fantastic job! And specifically, thanks for the Flask of the North support, I didn't think that this would happen but really appreciate having a reminder for it! It doesn't seem to work with the ZOMGSelfBuff templates however, would that be easy to achieve?

    Thanks,
    Dan.
    Posted in: General AddOns
  • 0

    posted a message on Textures & how to create a rounded button.
    Hey there,

    There's a button whose bgFile is set to a spell's texture (i.e. square with slightly rounded edges) and I'd like very much for it to be rounded. I have a .tga I expected to do this for me (it's basically a circle with an alpha:0 background) but when I :CreateTexture, :SetTexture etc I just get a small round blob inside the button with the button's icon still showing outside the blob (which should have alpha =0). I've tried the different blend modes but not much fundamental changes. The code's here: http://paste.wowace.com/864/

    Thanks in advance for any help,
    Dan.
    Posted in: Lua Code Discussion
  • 0

    posted a message on GetNumBindings, GetBinding - doesn't return 'user' bindings?
    Thanks,

    I'll try it and see if it's too much of a resource sink for the benefits,
    Dan.
    Posted in: Lua Code Discussion
  • 0

    posted a message on GetNumBindings, GetBinding - doesn't return 'user' bindings?
    Hi there,

    I'd like to know about all the bindings currently bound. I've hit a problem though, code like:

    local binds = {}
    for i=1, GetNumBindings() do
      local command = GetBinding(i)
      local bindings = {GetBindingKey(command)}
      binds[command] = bindings
    end


    results in binds only containing the bindings from Bindings.xml or the Blizzard controls, "MOVEFORWARD" etc. Is it not possible to iterate over bindings for directly bounds SPELLs, MACROs, ITEMs and CLICKs?

    Thanks,
    Dan.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Overload a table's metatable, # of a dictionary.
    Quote from yess
    This thread might help you: http://forums.wowace.com/showthread.php?t=15929


    Thanks! I did do a few searches but always for dictionaries, not tables so I missed that. next(t) is the answer for my immediate problem of 'if not empty then'.

    Quote from Slakah »
    Until then you could muck about with newproxy for the time being.

    Thanks! I'll memorise that for the future :)

    Dan.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Overload a table's metatable, # of a dictionary.
    Hi again,

    For dictionary tables (non-integer keys) I'd very much like to get the length simply with a #table op (partly because it's quicker to type and easier to read but mostly because I'd like to explore metatables some).

    Reading the manual leads me to conclude that this is impossible unless there's some way of overriding the __len method in a table's metatable that I'm missing.

    The manual says that it runs a function like this when a length op is requested:
         function len_event (op)
           if type(op) == "string" then
             return strlen(op)         -- primitive string length
           elseif type(op) == "table" then
             return #op                -- primitive table length
           else
             local h = metatable(op).__len
             if h then
               -- call the handler with the operand
               return (h(op))
             else  -- no handler available: default behavior
               error(···)
             end
           end
         end


    Which suggests that Lua never bothers to check a table's metatable for the __len function if its type == table.

    Does anyone know how to do this or has a definitive answer as to whether it's possible?

    Thanks, Dan.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Dynamically changing options tables and table reuse
    Aaah of course, I assumed that NotifyChange just refreshed values because the function didn't have any parameter giving a new table but because it's a reference from RegisterOptionsTable any changes will be reflected. Silly me, the problem was also the solution!

    Thanks Xin!
    Dan.
    Posted in: Ace3
  • 0

    posted a message on Dynamically changing options tables and table reuse
    Hi there,

    I'm trying to tighten up my addon's code. I am using AceConfig and options tables to do all my addon's configuration. I have a couple of questions regarding how best to implement dynamically changing options tables that include some constant and presumably reusable elements.

    Currently my code structure looks a bit like this (in no official form of pseudo code, sorry):

    OnLoad: RegisterOptions()
    OnChange: RegisterOptions()
    
    RegisterOptions()
        opts = {
            constantOpt = blah,
            anotherConstantOpt = blahtoo,
        }
    
        do loop on someSavedVariables
            opts.dynamicVariable = blah2
            opts.dynamicVariable = blah2too
        end loop
    
        AceConfig:RegisterOptionsTable(opts)
    end
    Firstly, is there a better way of refreshing my configuration screen when something updates (mainly new group elements are added)? I looked at NotifyChange() but that seems to just force a refresh of values rather than applying structural changes to the options table (which is what my dynamic changes do).

    Secondly, I worry that I'm creating many new table references every time I need to change the structure of my options table which I don't particularly like, but perhaps this is OK? The two solutions I can think of would be to move the constant parts out of the RegisterOptions function and either include them in the opts inside the RegisterOptions function (which would result in doubling up the options every time because all table assignments are references) or by copying it and then including it in the opts (which seems just as wasteful). It gets even more silly as a lot of the dynamic parts are just loops which include mostly constant tables with a few modifications based on iteration of the loop.

    If the question is still unclear (I don't blame you) the offending code is in SVN at svn://svn.curseforge.net/wow/settheory/mainline/trunk and known as opts.lua

    Thanks for any help you can give me,
    Dan.
    Posted in: Ace3
  • 0

    posted a message on LibErrUm.....Trigger?
    I did not expect such a library to be a massive memory saver but more an author time saver by providing a logical and quick way of expressing combinations of events and by offering to automatically generate a configuation UI for user-customisable triggers. Several addons I use implement this kind of functionality and all of them have one or two draw-backs such as not being able to combine triggers or being limited by their quantity or completeness.

    Either way, I'll implement what I have in mind for my own purposes and if I think it's worth sharing I'll try to do so.

    Thanks again,
    Dan.
    Posted in: Libraries
  • 0

    posted a message on Assignment, getting a copy and not a reference
    How about equality? No quick way to check if two different tables share common values?

    Dan.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.