View Single Post
08/04/15, 01:36 PM   #3
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
There are strange things that happen when messing with the keybindStrip, one example: http://www.esoui.com/forums/showthre...t=keybindstrip

But, I can tell you the reason is because you are using the same keybind "SC_BANK_ALL" for each keybindStrip button.
If you do your steps to reproduce the error you will notice that when you open the crafting window it shows the "Extract All" keybindStrip button. when you then click on the mail icon to open the mail from there, you are not removing that keybindStrip button. It will still show "Extract All".
Then when you switch to the Send Mail tab (since your using the same descriptor for all buttons) it is trying to place the "Attach All" button using the same "SC_BANK_ALL" keybind name which causes the assert error because that keybind/button already exists.

However, I wouldn't "just" change the names of them or just try to fix it so they remove properly. I would change it to just add the new keybindStrip button you want to the games default keybindDescriptor tables for each window then you don't have to worry about adding/removing the buttons, or any errors...like this:

Just do this instead:
Lua Code:
  1. local mailKeystripDescriptorTable = MAIL_SEND.staticKeybindStripDescriptor
  2.  
  3. local newDescriptor = {
  4.     name = "Attach All",
  5.     keybind = "SC_BANK_ALL",
  6.     callback = function() DoItAll.AttachAll() end,
  7.     alignment = KEYBIND_STRIP_ALIGN_LEFT,
  8. }
  9.  
  10. table.insert(mailKeystripDescriptorTable, newDescriptor)
Thats the only code you need (for the mail send window). The game will handle everything else.

Last edited by circonian : 08/04/15 at 01:41 PM.
  Reply With Quote