• 0

    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
  • 0

    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
  • 0

    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
  • 0

    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
  • 0

    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
  • 0

    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
  • 0

    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
  • 0

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

    Frame.tab.remotesequencebox:SetText("sometexthere")
    Posted in: Ace3
  • 0

    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
  • 0

    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!
  • 0

    posted a message on Using loadscript to load a table
    Hi All,

    I'm trying to load a table from a string and rather than trying to write a string manipulation function to pull the table apart I was looking at using loadscript.

    local testtable = {}
    local importStr = [[testtable["Test"] = {
    ["a"] = 1,
    ["b"] = 2,
    }]]
    
    assert(loadstring(importStr))


    If i evaluate testtable at this point its empty. Is there something I need to tell loadstring to allow it to access the local testtable?

    I also tried

    local loadfunc = loadstring(importStr)
    loadfunc()
    Posted in: Lua Code Discussion
  • 0

    posted a message on .pkgmeta for a multi folder addon
    Thank you all. I got exactly what I was after with https://github.com/TimothyLuke/GnomeSequenced-Enhanced/blob/master/.pkgmeta

    I'm prob still doing some things the hard way in that while the three know about each other i havent figured out how to make them a seamless object. The duplication works for me though in that some people only use the GS-Core and dump the rest. They then have just what they need to just run that.
    Posted in: AddOn HELP!
  • 0

    posted a message on .pkgmeta for a multi folder addon
    Hi All,

    I am used to using the .pkgmeta file for a single folder mod. I am currently creating a ZIP file for GnomeSequencer-Enhanced and pushing it Curse the old fashioned way but want to do something a bit more refined.

    My Github repository is located at : https://github.com/TimothyLuke/GnomeSequenced-Enhanced/

    This is my first cut of a .pkgmeta file would this be correct? At the end of the day I only want the three folders present within the ZIP at the root.

    package-as: GnomeSequencer-Enhanced
    
    externals:
        GS-Core/lib/LibStub:
            url: svn://svn.wowace.com/wow/libstub/mainline/trunk
            tag: latest
        GS-Core/lib/AceLocale-3.0:
            url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
            tag: latest
        GS-SequenceEditor/lib/LibStub:
            url: svn://svn.wowace.com/wow/libstub/mainline/trunk
            tag: latest
        GS-SequenceEditor/lib/CallbackHandler-1.0:
            url: svn://svn.wowace.com/wow/callbackhandler/mainline/trunk/CallbackHandler-1.0
            tag: latest
        GS-SequenceEditor/lib/AceAddon-3.0:
            url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceAddon-3.0
            tag: latest
        GS-SequenceEditor/lib/AceLocale-3.0:
            url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
            tag: latest
        GS-SequenceEditor/lib/AceConfig-3.0:
            url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConfig-3.0
            tag: latest
        GS-SequenceEditor/lib/AceConsole-3.0:
            url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceConsole-3.0
            tag: latest
        GS-SequenceEditor/lib/AceEvent-3.0:
            url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceEvent-3.0
            tag: latest
        GS-SequenceEditor/lib/AceGUI-3.0:
            url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceGUI-3.0
            tag: latest
    
    ignore:
        - GS-MyMacros 
        - GS-HighPerformanceMacros 
        - .travis.yml
        - README.md
        - spec
    Posted in: AddOn HELP!
  • 0

    posted a message on Sample addon to use AceConfig and AceDB
    Quote from Phanx
    There's no point in listing your libraries in an "embeds.xml" file. That convention came into being to accommodate the original WowAce site backend and updater program, neither of which exist today, and which needed such a file to detect which libraries it should package/install (or not, for "nolib" users) with an addon.


    I know this hasnt been updated since 2010 but https://www.wowace.com/addons/ace3/pages/getting-started/ talks about using the embeds.xml still.

    <Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
      <Script file="Libs\LibStub\LibStub.lua"/>
      <Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml"/>
      <Include file="Libs\AceConsole-3.0\AceConsole-3.0.xml"/>
    </Ui>


    Does this mean we can just link to the .lua file in our .toc file so that the above becomes

    ##Normal toc stuff here
    
    #libs
    Libs\LibStub\LibStub.lua
    Libs\AceAddon-3.0\AceAddon-3.0.lua
    Libs\AceConsole-3.0\AceConsole-3.0.lua
    
    #myMod
    mymod.lua


    Or do we still link to the xml file
    Libs\AceAddon-3.0\AceAddon-3.0.xml
    Posted in: AddOn HELP!
  • 0

    posted a message on Hooking MultilineEditBox to ForAllIndentsAndPurposes
    From editor-core

    IndentationLib:enable(sequencebox.editBox, SyntaxColors, TAB_WIDTH) <-- is exactly how WeakAuras hook this function.

    function GSSE:drawstandardwindow(container)
      local sequencebox = AceGUI:Create("MultiLineEditBox")
      sequencebox:SetLabel("Sequence")
      sequencebox:SetNumLines(20)
      sequencebox:DisableButton(true)
      sequencebox:SetFullWidth(true)
      sequencebox:SetText(sequenceboxtext:GetText())
    --  sequencebox.editBox:SetMaxBytes(0)
    --  sequencebox.editBox:SetMaxLetters(0)
      --[B]IndentationLib:enable(sequencebox.editBox, SyntaxColors, TAB_WIDTH)[/B]
      container:AddChild(sequencebox)
    
      local updbutton = AceGUI:Create("Button")
      updbutton:SetText("Create / Edit")
      updbutton:SetWidth(200)
      updbutton:SetCallback("OnClick", function() GSSE:updateSequence(currentSequence) end)
      container:AddChild(updbutton)
      sequenceboxtext = sequencebox
    end



    Enable function on FAIAP
        function lib.enable(editbox, colorTable, tabWidth)
            if not editboxSetText then
                editboxSetText = editbox.SetText
                editboxGetText = editbox.GetText
            end
    
            local modified
            if editbox.faiap_colorTable ~= colorTable then
                editbox.faiap_colorTable = colorTable
                modified = true
            end
            if editbox.faiap_tabWidth ~= tabWidth then
                editbox.faiap_tabWidth = tabWidth
                modified = true
            end
    
            if enabled[editbox] then
                if modified then
                    lib.indentEditbox(editbox)
                end
                return
            end
    
            -- Editbox is possibly hooked, but disabled
            enabled[editbox] = true
    
            editbox.oldMaxBytes = editbox:GetMaxBytes() -- Fails with a nil here on GetMaxBytes()
            editbox.oldMaxLetters = editbox:GetMaxLetters() -- Fails with a nil here on GetMaxLetters()
            editbox:SetMaxBytes(0) -- Fails with a nil here on SetMaxBytes()
            editbox:SetMaxLetters(0) -- Fails with a nil here on SetMaxLetters()
    
            editbox.GetText = newGetText
            editbox.SetText = newSetText
    
            hookHandler(editbox, "OnTextChanged", textChangedHook) -- These hook lines also fail with enclosed methods being nil
            hookHandler(editbox, "OnTabPressed", tabPressedHook)
            hookHandler(editbox, "OnUpdate", onUpdateHook)
    
            lib.indentEditbox(editbox)
        end


    Now this works for every other application and example I can find. WeakAuras 2 uses this in their ACEGUI addon. I and they are running the same Ace Versions and FAIAP versions.
    Posted in: Ace3
  • To post a comment, please or register a new account.