Ace3

Addons
7,681,717 Downloads Last Updated: Aug 12, 2019 Game Version: 8.2.0

AceConfigDialog-3.0: Clicking several times on an 'execute' without answering the confirm dialog

#266 By  archarodim

Created Sep 19, 2011 Updated --

Open
Assigned to  nevcairiel
New
Defect

What steps will reproduce the problem?
1. Have an option of type 'execute'
2. Set confirm to true
3. Click several times on the button before answering the confirm popup affirmatively

What is the expected output? What do you see instead?

The execute function should be called with a useful 'info' table as its first argument.
Instead, the execute function is called with an empty table as its first argument

What version of the product are you using?

r1037

Do you have an error log of what happened?

Here is an exemple involving Decursive:

Interface\AddOns\Decursive\Dcr_opt.lua:2776: attempt to index field '?' (a nil value),
STACK:
, (tail call): ?
[C]: ?
[string "safecall Dispatcher[3]"]:9: in function <[string "safecall Dispatcher[3]"]:5>
(tail call): ?
...nfig-3.0\AceConfigDialog-3.0\AceConfigDialog-3.0.lua:585: in function `OnAccept'
Interface\FrameXML\StaticPopup.lua:3548: in function `StaticPopup_OnClick'
[string "*:OnClick"]:1: in function <[string "*:OnClick"]:1>
,
LOCALS:
, nil -|count: 1

Here is the code involved:

delete = {
                type = 'execute',
                name = function(info) return ("%s %q"):format(L["OPT_DELETE_A_CUSTOM_SPELL"], info[#info - 1]) end,
                confirm = true,
                width = 'double',
                func = function (info)

                        if D.classprofile.UserSpells[info[#info - 1]].IsDefault then // THIS IS THE LINE 2776 FROM THE REPORT ABOVE
                            D.classprofile.UserSpells[info[#info - 1]].Types = {};
                            D.classprofile.UserSpells[info[#info - 1]].Hidden = true;
                        else
                            D.classprofile.UserSpells[info[#info - 1]] = nil;
                        end

                        if D.Status.FoundSpells[info[#info - 1]] then
                            D:Configure();
                        end

                end,
                order = -1,
            },
archarodim   added the tags
New
Defect
  Sep 19, 2011

To post a comment, please login or register a new account.