I have a mod that contains a bunch of macros. The problem has been that macro lines are sent to the WoW client in the language of the client. "/cast Judgement" needs to be "/cast Judderama". To be able to swap code between enUS and xxXX I got the mod to store SpellId's instead of spell names.
Its ok if you are just reading but if you create a macro and save it, change talents and edit again and save instead of Hammer of the Righteous i now have saved Blessed Hammer's ID and when I change talents back "/cast Blessed Hammer" wont call "/cast Hammer of the Righteous"
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)
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.
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?
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
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.
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'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.
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.
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.
0
Did you find a better solution for this Pjizzle?
I have a mod that contains a bunch of macros. The problem has been that macro lines are sent to the WoW client in the language of the client. "/cast Judgement" needs to be "/cast Judderama". To be able to swap code between enUS and xxXX I got the mod to store SpellId's instead of spell names.
Its ok if you are just reading but if you create a macro and save it, change talents and edit again and save instead of Hammer of the Righteous i now have saved Blessed Hammer's ID and when I change talents back "/cast Blessed Hammer" wont call "/cast Hammer of the Righteous"
0
I use Atom on both Windows and Mac. It has syntax highlighting support for the WOW API and Lua. https://atom.io
0
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
--@localization(locale="ptBR", format="lua_additive_table")@
0
Turns out the Curse application cleans up removed files and folders.
0
I have a mod that currently is packaged and deployed via Curse. It currently installs into three folders at the root level:
I have now rewritten it to be:
Do I need to put anything into the .pkgmeta to remove the old GS-SequenceEditor and GS-DraikMacros folders?
0
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?
Is is possible to tell column1 that everything anchors Top Left?
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:
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.
0
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.)
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?
0
Frame.tab.remotesequencebox:SetText("sometexthere")
0
My final code ended up looking like
0
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.
The problem is that even though ImportString is defined in WA\Transmission.lua when its nil post load.
Has anyone attempted this before?
0
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.
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
0
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.
0
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.
0
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.
Does this mean we can just link to the .lua file in our .toc file so that the above becomes
Or do we still link to the xml file