View Single Post
04/28/14, 05:26 AM   #1
LoPony
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 10
SetHidden and event handlers

Hello!

I’m a little bit confused.
If I hide a TopLevelControl with control:SetHidden( true ), my OnUpdate-Handler stops working.

Example:
Code:
control:SetHandler( 'OnUpdate', function() OnUpdate() end )
It starts again after using control:SetHidden( false )

Does all events defined by control:SetHandler or control:RegisterForEvent stop working if the control is hidden?
Haven’t tested all the possible events and also not tested events defined by the EVENT_MANAGER.

Is this working as intended?
Is there any possibility to run OnUpdate even if the control isn’t visible (but should still update some data)?

greetings
  Reply With Quote