Thread Tools Display Modes
Prev Previous Post   Next Post Next
11/29/14, 05:17 PM   #1
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,187
Event EVENT_MAIL_CLOSE_MAILBOX fired upon closing of inventory?

I just debugged some sourcecode and found out that the following event "EVENT_MAIL_CLOSE_MAILBOX" will be fired if the inventory of the player gets closed?
It fires even 3 times if I open the mailbox and close the mailbox afterwards sometime?

Lua Code:
  1. EVENT_MANAGER:RegisterForEvent(gAddonName, EVENT_MAIL_OPEN_MAILBOX, Open_Mail_Panel)
  2.     EVENT_MANAGER:RegisterForEvent(gAddonName, EVENT_MAIL_CLOSE_MAILBOX, Close_Mail_Panel)
  3.  
  4. --Event upon opening of the mail panel
  5. local function Open_Mail_Panel()
  6.     d("Open_Mail")
  7. end
  8.  
  9. --Event upon closing of the mail panel
  10. local function Close_Mail_Panel()
  11.     d("Close_Mail")
  12. end

Is this normal and wished?
Or do I have to unregister the event in the "Open_Mail_Panel()" function and register it again in "Close_Mail_panel()" function?

Thanks
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » Event EVENT_MAIL_CLOSE_MAILBOX fired upon closing of inventory?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off