Thread Tools Display Modes
11-04-10, 11:21 PM   #1
help137
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 31
RegisterEvent question

Does anyone know what happens if you register an event you've already got registered? or Unregister one that isn't registered? Will the UI throw an error? Call the associated event handle twice? Etc, etc?


-A
  Reply With Quote
11-04-10, 11:44 PM   #2
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
I have registered a event multi times by accident. Normally happens when I start coding out of my head and don't check what i have done. I have never seen any adverse effects.

As far as unregistering a event I don't think so. You can't unregister what isn't there and I think it just overlooks this.
__________________
[SIGPIC][/SIGPIC]
  Reply With Quote
11-05-10, 12:22 AM   #3
Xinhuan
A Chromatic Dragonspawn
 
Xinhuan's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 174
No error will occur in both cases. It will just fail silently.
__________________
Author of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, GatherMate2, Routes and Cartographer_Routes
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » RegisterEvent question


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