Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-14-20, 09:07 AM   #1
Lybrial
A Flamescale Wyrmkin
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 120
How to call functions on protected ui objects?

Im currently getting two errors:

Lua Code:
  1. AddOn 'Lybrial_ActionBars' tried to call the protected function 'SpellFlyout:SetFrameStrata()'.

And:

Lua Code:
  1. AddOn 'Lybrial_UI' tried to call the protected function 'Lybrial_ActionBars_Pet_Frame:Show()'.
  2. in function `FadeIn'

How can do either of those two things?

1. Call those functions anyway?
2. Prevent those functions from getting called when they are secured / protected?

For option two I thought checking for "IsForbidden()" would do the trick but I was wrong, meaning this here:

Lua Code:
  1. if (not _G.SpellFlyout:IsForbidden()) then
  2.     _G.SpellFlyout:SetFrameStrata("HIGH")
  3. end

And this:

Lua Code:
  1. if (not frame:IsForbidden()) then
  2.     UIFrameFadeIn(frame, 0.2, frame:GetAlpha(), 1);
  3. end

Did not fix the errors.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » How to call functions on protected ui objects?


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