WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   hiding widgets without unregistering events (https://www.wowinterface.com/forums/showthread.php?t=55961)

Eungavi 01-09-18 11:01 PM

hiding widgets without unregistering events
 
Hiya!

Just a quick question here. Does hidden widgets without unregistering events would still respond to a registered events and its handler?

Thank you :)

myrroddin 01-10-18 12:57 AM

They should still respond, yes. Hiding is exactly that not making it visible, whereas unregistering an event is exactly how it sounds. Hiding and unregistration are two separate things altogether.

Case in point, think about how an event handler frame is created:
  1. Create the frame
  2. Register event(s) on the frame
  3. Set a script handler on the frame
  4. Hide the frame
Widgets operate the same way.

Torhal 01-10-18 05:12 AM

Events will still be listened to, but OnUpdate handlers will not fire since those are ran every time a new frame is rendered - hidden frames are obviously not rendered.

Eungavi 01-10-18 04:29 PM

Thank you guys :D


All times are GMT -6. The time now is 11:04 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI