• 0

    posted a message on Assignment, getting a copy and not a reference
    Answer's no then, thanks a lot :)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Assignment, getting a copy and not a reference
    Can I take a copy of a variable with some assignment rather than a reference pointing to it? For example,

    local tbl1 = {'blah', 'blah2'}
    local tbl2 = tbl1 -- I'd like to copy not reference
    table.remove(tbl2, 1)
    -- tbl2 should ~= tbl1


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

    posted a message on LibErrUm.....Trigger?
    Quote from Arrowmaster
    You only code what you need when you aren't using a library and your idea included so many different types of triggers that it would be total bloat fest.


    I think that 'bloat' is a very odd way to describe functionality. I suspect that often authors that implement situational changes don't explore the full range of options that users may find useful because they'd rather be spending time on the rest of their, more interesting, code. And how much bloat are we talking here, a hundred k or so of memory?

    I'm also not at all sure I'm going to make it. If and when I implement 'triggers' in my addon I may as well do so in as modular and reusable way as possible if only just for my own purposes. After all, it's wanting to be able to just type code much like in my example that prompted me to look for such a library in the first place.
    Posted in: Libraries
  • 0

    posted a message on LibErrUm.....Trigger?
    Quote from Tekkub
    ... you're just creating a wrapper around the current events and API...


    Quote from Adirelle »
    ...but there is so much things to test that it could quickly get bloated.


    While I agree with both of these sentiments I think a point could be made that while everyone writes the lua for their events total bloat is increased. These sorts of triggers occur in a lot of addons and perhaps would occur in many more or in a more advanced and customisable way if a time saving and simpler way of accessing the events that also offered a convinient way of exposing the configuration of the triggers in a front-end were available.
    Posted in: Libraries
  • 0

    posted a message on LibErrUm.....Trigger?
    I'd like to include the ability to activate some actions based on 'triggers', i.e. certain zone names/types, party type, gear swaps pvp status etc etc. I wonder if a library for this purpose exists and if not whether it would be worth it to create one.

    For (contrived) example,

    addon = LibStub("AceAddon-3.0"):NewAddon("Addon", "LibTrigger")
    addon:RegisterTrigger(addon:Trigger('zone', 'the storm peaks'):And('pvp', true), function() print('PvP on in the Storm Peaks!?') end)

    Thanks,
    Dan.
    Posted in: Libraries
  • 0

    posted a message on SetTheory - Sets of addon configurations
    Hi again,

    I've reached a stage with the addon where I think it's worthy of a 'release' build.
    New features:
    * Lua code action
    * Keybinds
    * Rebuilt the UI and included some options
    * You're now prompted to choose a set to apply when you respec

    It's on curse as v0.4-release: http://wow.curse.com/downloads/wow-addons/details/settheory.aspx

    The next thing I implement will be 'Set triggers' so that sets can be applied based on zone, group-type, etc.

    All modules:

    • Talent Spec
    • Talented
    • Blizzard Equipment Manager
    • Outfitter
    • ItemRack
    • Generic Ace3 profiles
    • Ace3 addon disable/enabling (for example disable addons you don't use when not raiding/PvPing/grinding enhancing system performance)
    • TrinketMenu
    • TellMeWhen
    • ZOMGBuffs (Self, Raid + Blessings)
    • Power Auras
    • AddonControlPanel (ACP)
    • XPerl
    • DoTimer
    • Lua code
    All features

    • Addon Options GUI
    • Command line (i.e. for macros)
    • Keybinds
    • LibDataBroker (for FuBar, with Broker2Fubar addon, TitanPanel, etc)
    • Talent swaps and respecs.
    Thanks,
    Dan.
    Posted in: General AddOns
  • 0

    posted a message on UISpecialFrames - Esc not working for my frame
    Well I fixed it by changing:

    local f = CreateFrame("Frame", "SetTheoryRespecFrame", UIParent)
    to

                CreateFrame("Frame", "SetTheoryRespecFrame", UIParent)
                local f = getglobal('SetTheoryRespecFrame')
    Is this just what you have to do or has something else I've done wrong caused it? And for some reason my frame got larger but SetScale fixed that.

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

    posted a message on UISpecialFrames - Esc not working for my frame
    In fact, not much seems to work from the frame's global name, e.g. getglobal('SetTheoryRespecFrame'):Show() does nothing, but it works when using the frame's stored variable reference. Though when using GetMouseFocus():GetName() the name's returned correctly when hovering over my shown frame (whose global doesn't think it's shown).
    Posted in: Lua Code Discussion
  • 0

    posted a message on UISpecialFrames - Esc not working for my frame
    Hi again,

    So I make a frame:
                local f = CreateFrame("Frame", "SetTheoryRespecFrame", UIParent)


    I add it to the UISpecialFrames table (and I've verified that it's being added to the table):
                tinsert(getglobal("UISpecialFrames"), "SetTheoryRespecFrame")

    But my frame is not being affected by pressing Esc at all. Can anyone spot what I've missed?

    Thanks,
    Dan.

    P.S. The full code for the frame is below:

                local f = CreateFrame("Frame", "SetTheoryRespecFrame", UIParent)
                tinsert(getglobal("UISpecialFrames"), "SetTheoryRespecFrame")
                f:SetPoint("TOP", "UIParent", "Top", 0, -100)
                f:SetFrameStrata("DIALOG")
                f:SetHeight(125)
                f:SetWidth(400)
                f:SetBackdrop({
                    bgFile = "Interface/Tooltips/UI-Tooltip-Background",
                    edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
                    tile = true, tileSize = 32, edgeSize = 32,
                    insets = { left = 9, right = 9, top = 9, bottom = 9 }
                })
                f:SetBackdropColor(0,0,0, 0.8)
                f:EnableMouse(true)
                f:SetMovable(true)
                f:SetScript("OnMouseDown", function() f:StartMoving() end)
                f:SetScript("OnMouseUp", function() f:StopMovingOrSizing() end)
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetTheory - Sets of addon configurations
    Quote from xbeeps
    It wasn't until i started looking at the code to figure out what was wrong, that i noticed that it was tristate check boxes.


    Urgh, I was hoping no one would ever see the code ;-p

    Quote from xbeeps
    How is the user supposed to know that a grey check mark is disabled, and a golden check mark is on, and no check mark is off?


    I will try to enhance this point in the instructions for the action which are above the group selection options.

    Thanks for the help,
    Dan.
    Posted in: General AddOns
  • 0

    posted a message on SetTheory - Sets of addon configurations
    Hi again,

    I made implicit waits for the modules that need it (item swapping and talent switching) though you can still add your own pauses in case there're any unforseen problems with chained events. There are not a lot more modules available for some of the popular addons that I don't use (including ACP mentioned earlier in the thread).

    Quote from xbeeps »
    all bars disappearing when switching two times, if there is no overlap between the two sets. It isn't very intuitive, and i don't really see what it adds, so i would suggest a simple on/off for each bar.


    The reason for them being tri-state in my mind is so that changes made in the addon's own config for groups that are not involved in 'playstyle' switches do not have to be configured twice (I don't want to replace an addon's own configuration). The bug you describe would be a big problem, however, I have not been able to reproduce the effects; a group with a greyed out checkbox is not modified in any way for me. Would you be able to provide any more information or steps to reproduce the bug?

    Thanks a lot for your help,
    Dan.
    Posted in: General AddOns
  • 0

    posted a message on RunMacro - Can be done without a button?
    Quote from Medii
    You could always put everything that needs to be done in another macro that then clicks the user's macro


    Good idea! Thanks Medii, I'll look into it.
    Posted in: Lua Code Discussion
  • 0

    posted a message on SetTheory - Sets of addon configurations
    Quote from xbeeps
    Specifically i want to be able to switch between sets of bars in TellMeWhen, because i use very different triggers in different talent specs.


    There's now a TellMeWhen module in the SVN: svn://svn.curseforge.net/wow/settheory/mainline/trunk

    Hope it's useful,
    Dan.
    Posted in: General AddOns
  • 0

    posted a message on RunMacro - Can be done without a button?
    I'd like to offer the ability to include macros in 'action sequences' (maybe referring to them as a set is a bad idea) as it adds flexibility and extensibility. For example, if someone currently uses a macro to facilitate their play-style switches and a module for SetTheory is not forthcoming they may be able to quickly integrate that action-switch with a macro. Hopefully it can be done, but if not it's not game-breaking.

    Dan.
    Posted in: Lua Code Discussion
  • 0

    posted a message on RunMacro - Can be done without a button?
    Quote from LaoTseu
    Not sure if that will do what you want to you can assign a key to a macro without having to put the macro in a button. Anything that use the LibKeyBound will allow you to assign the key directly when the macro window is open.


    Unfortunately the macro is associated with a chain of events so I can't isolate it directly.

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