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:SetCallback("OnTextChanged", function(self) currentSequence = self:GetText(); dirtyeditor = true end)
stepdropdown:SetCallback("OnValueChanged", function (obj,event,key) stepvalue = key; dirtyeditor = true end)
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?