WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   PTR API and Graphics Changes (https://www.wowinterface.com/forums/forumdisplay.php?f=175)
-   -   Error in Blizzard API when Hiding (https://www.wowinterface.com/forums/showthread.php?t=56251)

Joker119 05-29-18 01:01 AM

Error in Blizzard API when Hiding
 
When I hide the MainMenuArtBar.LeftEndCap, RightEndCap and MainMenuArtBarBackground.BackgroundSmall textures, I get this UI error
Code:

Message: Interface\FrameXML\MainMenuBar.lua:378: attempt to compare number with nil
Time: Mon May 28 23:59:24 2018
Count: 1
Stack: Interface\FrameXML\MainMenuBar.lua:378: attempt to compare number with nil
Interface\FrameXML\MainMenuBar.lua:378: in function `ChangeMenuBarSizeAndPosition'
Interface\FrameXML\MainMenuBar.lua:110: in function <Interface\FrameXML\MainMenuBar.lua:56>

Locals: self = MainMenuBar {
 0 = <userdata>
 OnShow = <function> defined @Interface\FrameXML\MainMenuBar.lua:28
 OnLoad = <function> defined @Interface\FrameXML\MainMenuBar.lua:10
 ChangeMenuBarSizeAndPosition = <function> defined @Interface\FrameXML\MainMenuBar.lua:352
 OnEvent = <function> defined @Interface\FrameXML\MainMenuBar.lua:56
 state = "player"
 SetPositionForStatusBars = <function> defined @Interface\FrameXML\MainMenuBar.lua:33
 slideOut = <unnamed> {
 }
 OnStatusBarsUpdated = <function> defined @Interface\FrameXML\MainMenuBar.lua:6
}
rightMultiBarShowing = nil
_ = 1721259
width = 550
height = 49
scale = 1
rightGryphon = nil
xOffset = 0
(*temporary) = 958.3193359375
(*temporary) = MicroButtonAndBagsBar {
 0 = <userdata>
 MicroBagBar = <unnamed> {
 }
}
(*temporary) = 958.3193359375
(*temporary) = -3
(*temporary) = <userdata>
(*temporary) = 0.64453125
(*temporary) = false
(*temporary) = false
(*temporary) = "attempt to compare number with nil"

I'm hiding the textures simply by using SetTexture(nil) but I feel this is wrong, due to the errors.
I don't get this error using this method to hide those textures on live.

Ammako 05-29-18 04:48 AM

What if you used :Hide() or :SetAlpha(0) on the textures instead?

Joker119 05-29-18 05:26 AM

SetAlpha worked beautifully, thank you.


All times are GMT -6. The time now is 09:05 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI