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


  • New
  • Defect
Open
Assigned to nevcairiel
  • archarodim created this issue Sep 19, 2011

    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
  • archarodim edited title Sep 19, 2011

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