• posted a message on What development stack do you use for creating an addon?

    I use Atom on both Windows and Mac.  It has syntax highlighting support for the WOW API and Lua. https://atom.io

    Posted in: Lua Code Discussion
  • posted a message on Localization auto insert not always working

    I waited 6 hours after packaging with this build https://wow.curseforge.com/projects/gse-gnome-sequencer-enhanced-advanced-macros/files/2366270

     

    and the ptBR file which should have some entries has the following but no translations:

     

    if not(GetLocale() == "ptBR") then
        return;
    end

    local L = LibStub("AceLocale-3.0"):NewLocale("GSE", "ptBR", true)

    -- Options translation
    [email protected](locale="ptBR", format="lua_additive_table")@

    Posted in: WoW Sites Feedback
  • posted a message on Curse Client and Changing a mods Folder Structure

    Turns out the Curse application cleans up removed files and folders.

    Posted in: Addon Help
  • posted a message on Curse Client and Changing a mods Folder Structure

    I have a mod that currently is packaged and deployed via Curse.  It currently installs into three folders at the root level:

    • Interface\Addons\GS-Core
    • Interface\Addons\GS-SequenceEditor
    • Interface\Addons\GS-DraikMacros

    I have now rewritten it to be:

    • Interface\Addons\GSE
    • Interface\Addons\GS-Core

    Do I need to put anything into the .pkgmeta to remove the old GS-SequenceEditor and GS-DraikMacros folders?

    Posted in: Addon Help
  • posted a message on AceGUI and Component Anchoring

    Hi All,

     

    I have a SimpleGroup within a container to make up columns.  As one column will be shorter than the other the components are centering within the SimpleGroup.  is there a way that I can set the Simple Group to justify Top, Left?

     

    local columngroup = AceGUI:Create("SimpleGroup")
    columngroup:SetFullWidth(true)
    columngroup:SetLayout("Flow")

    local column1 = AceGUI:Create("SimpleGroup")
    column1:SetWidth(520)
    column1:SetLayout("List")

    columngroup:AddChild(column1)



    local helplabel = AceGUI:Create("Label")
    local helptext = L["No Help Information Available"]
    if not GSE.isEmpty(GSELibrary[classid][elements[2]].Help) then
    helptext = GSELibrary[classid][elements[2]].Help
    end
    helplabel:SetFullWidth(true)

    helplabel:SetText(helptext )
    column1:AddChild(helplabel)

    local column2 = AceGUI:Create("SimpleGroup")

    ......

    Is is possible to tell column1 that everything anchors Top Left?

    Posted in: Ace3
  • posted a message on Creating a Dragable button using LibActionButton-1.0

    I currently have a hidden "button" that is accessed by a /click button macro.  Ideally I would like to be able to just put the button onto the Action bar but not have to use the /macro stub.  I am probably headed in the wrong direction however I was referred to LibActionButton and have gotten this far:

     

    local L = LibStub("AceLocale-3.0"):GetLocale("GS-SE")
    local LAB = LibStub("LibActionButton-1.0")
    local SecureHeader = CreateFrame("Frame", "GSSEButtonSecureHeader", UIParent, "SecureHandlerStateTemplate")
    RegisterStateDriver(SecureHeader, "page", "[mod:alt]2;1")
    SecureHeader:SetAttribute("_onstate-page", [[
        self:SetAttribute("state", newstate)
        control:ChildUpdate("state", newstate)
    ]])
    
    local buttonIndex = 0
    
    local function CreateMenuItem(SequenceName)
      buttonIndex = buttonIndex + 1
      local button = LAB:CreateButton(1, "RBButton"..buttonIndex, SecureHeader)
      button:DisableDragNDrop(true)
    
      button:SetState(1, "macro" ,'#showtooltip\n/click ' .. SequenceName)
      button:SetState(2, "macro" ,'#showtooltip\n/click ' .. SequenceName)
      button:SetMovable(true)
      button:SetClampedToScreen(true)
    	button:SetScript("OnDragStart", function(self) if self:IsMovable() and IsAltKeyDown() then self.isMoving = true; self:StartMoving(); end end)
    	button:SetScript("OnDragStop",  function(self) if self:IsMovable() and self.isMoving == true then self:StopMovingOrSizing(); self:SavePosition() end end )
      button:SetAttribute('macro','#showtooltip\n/click ' .. SequenceName)
      button:SetPoint("CENTER", UIParent)
      button:SetNormalTexture("Interface\\icons\\INV_MISC_QUESTIONMARK")
      button:Show()
    
    end
     

    This gives me a transparent Button Frame but not a button. (This may be my misunderstanding of widgets so apologise in advance.)

     

    I cant figure out what StateDriver or other things I need to add or set.

     

     

    Posted in: Libraries
  • posted a message on ACEGUI and Show() event Timing - Determing if edits have been made on a frame

    Hi All,

     

    I'm trying to identify if a field on a frame has changed to determine what actions to take when closing a frame.  The full code for this is located at https://github.com/TimothyLuke/GnomeSequenced-Enhanced/blob/master/GS-SequenceEditor/editor-core.lua

     

    my code looks like this:  (Ive abbreviated for simplicity.)

     

    ...
    local dirtyeditor = false -- At the moment for debugging this is a global but should be a local at the end.
    ...
    local nameeditbox = AceGUI:Create("EditBox")
    nameeditbox:SetLabel(L["Sequence Name"])
    nameeditbox:SetWidth(250)
    nameeditbox:SetCallback("OnTextChanged", function(self) currentSequence = self:GetText(); dirtyeditor = true end)
    nameeditbox:DisableButton( true)
    editframe:AddChild(nameeditbox)
    ...
    stepdropdown:SetCallback("OnValueChanged", function (obj,event,key) stepvalue = key; dirtyeditor = true end)
    editframe:AddChild(stepdropdown)
    ...
    editframe:Show()
    dirtyeditor = false

     I added a bunch of print statements and what is occuring is that editframe:Show() is called, dirtyeditor is set to false but then every widget then fires its OnChange event twice (usually in a sequential order but not always the same order).  This sets dirtyeditor to true before any user input can occur.  Is there an API call I can hit to determine if a widget has changed or another way around this race condition?

     

     

     

    Posted in: Ace3
  • posted a message on ACEGUI Tabs
    What I am asking is can i do something like:

    Frame.tab.remotesequencebox:SetText("sometexthere")
    Posted in: Ace3
  • posted a message on Using loadscript to load a table
    Thanks Farmbuyer.

    My final code ended up looking like

    function GSSE:importSequence()
      local functiondefinition =  importStr .. [===[
    
      return Sequences
      ]===]
      GSPrintDebugMessage (functiondefinition, "GS-SequenceEditor")
      local fake_globals = setmetatable({
        Sequences = {},
        }, {__index = _G})
      local func, err = loadstring (functiondefinition, "GS-SequenceEditor")
      if func then
        -- Make the compiled function see this table as its "globals"
        setfenv (func, fake_globals)
    
        local TempSequences = assert(func())
        if not GSisEmpty(TempSequences) then
          local newkey = ""
          for k,v in pairs(TempSequences) do
            local tver = v.version
            if GSisEmpty(tver) then
              tver = 1
            end
            GSAddSequenceToCollection(k, v, tver)
            newkey = k
          end
          names = GSSE:getSequenceNames()
          listbox:SetList(names)
          listbox:SetValue(newkey)
        end
      else
        GSPrintDebugMessage (err, GNOME)
      end
    Posted in: Lua Code Discussion
  • posted a message on Importing a string to Weakauras
    GS-E makes it easier to manage GS based macros. I had a guy who has written an addon to GS-E suggest that if he could store his WeakAura strings in his GS-E plugin it would make things easier for his users. SO what I am trying to research is how to load a string into WeakAuras2.

    The way I envisage this feature working is that the strings are loaded in WA but the user has to choose to activate them via WA itself. My aim is just to simplify the import process.

    I have been digging through and got this far.

    local WeakAuras = WeakAuras
    
    if WeakAuras then
      WeakAuras.ImportString(str)
    end
    


    The problem is that even though ImportString is defined in WA\Transmission.lua when its nil post load.

    Has anyone attempted this before?
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.