conflict with kgpanels
mechantokun opened this issue ยท 1 comments
Dear NDui Staff team,
I am searching for help with my issue with NDui using Kgpanels.
I would like to customize a little bit my UI with some custom texture so i use kgpanel (addon that create panels for customizing your UI).
I would like to add some custom borders to my unitframes.
as an example, I add a panel and set its Parent as oUF_Player (by default to ParentUI) to my player frame, everything works fine.
But...Once i reload the UI , NDui UnitFrame (oUF) is not showing anymore and I get this error message:
Message: Interface\AddOns\NDui\Libs\oUF\units.lua:183: attempt to index local 'unit' (a nil value)
Time: Sat Oct 15 16:10:14 2022
Count: 1
Stack: Interface\AddOns\NDui\Libs\oUF\units.lua:183: attempt to index local 'unit' (a nil value)
[string "@Interface\AddOns\NDui\Libs\oUF\units.lua"]:183: in function `HandleUnit'
[string "@Interface\AddOns\NDui\Libs\oUF\ouf.lua"]:308: in function <Interface\AddOns\NDui\Libs\oUF\ouf.lua:258>
[string "=(tail call)"]: ?
[string "@Interface\AddOns\NDui\Libs\oUF\ouf.lua"]:736: in function `Spawn'
[string "@Interface\AddOns\NDui\Modules\UFs\Spawns.lua"]:346: in function `OnLogin'
[string "@Interface\AddOns\NDui\Init.lua"]:117: in function `func'
[string "@Interface\AddOns\NDui\Init.lua"]:23: in function <Interface\AddOns\NDui\Init.lua:18>
Locals: self = <table> {
DisableBlizzard = <function> defined @Interface\AddOns\NDui\Libs\oUF\blizzard.lua:64
SetActiveStyle = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:425
EnableFactory = <function> defined @Interface\AddOns\NDui\Libs\oUF\factory.lua:38
HCYColorGradient = <function> defined @Interface\AddOns\NDui\Libs\oUF\colors.lua:226
ColorGradient = <function> defined @Interface\AddOns\NDui\Libs\oUF\colors.lua:261
SpawnHeader = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:633
RegisterStyle = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:409
AddElement = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:855
useHCYColorGradient = false
RGBColorGradient = <function> defined @Interface\AddOns\NDui\Libs\oUF\colors.lua:150
Factory = <function> defined @Interface\AddOns\NDui\Libs\oUF\factory.lua:27
colors = <table> {
}
SpawnNamePlates = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:754
Tags = <table> {
}
HandleEventlessUnit = <function> defined @Interface\AddOns\NDui\Libs\oUF\units.lua:220
version = "10.1.1"
RunFactoryQueue = <function> defined @Interface\AddOns\NDui\Libs\oUF\factory.lua:46
DisableFactory = <function> defined @Interface\AddOns\NDui\Libs\oUF\factory.lua:42
objects = <table> {
}
RegisterMetaFunction = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:391
RegisterInitCallback = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:380
headers = <table> {
}
HandleUnit = <function> defined @Interface\AddOns\NDui\Libs\oUF\units.lua:175
GetActiveStyle = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:437
IterateStyles = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:452
Spawn = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:725
}
object = kgPanel4 {
0 = <userdata>
_backdrop_options = <table> {
}
SetBackdropGradientAlpha = <function> defined @Interface\AddOns\kgPanels\Libs\LibBackdrop-1.0\LibBackdrop-1.0.lua:540
PLAYER_ENTERING_WORLD = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:52
OnBackdropLoaded = <function> defined @Interface\SharedXML\Backdrop.lua:152
GetBackdropColor = <function> defined @Interface\SharedXML\Backdrop.lua:390
_backdrop = <unnamed> {
}
_GetBackdropBorderColor = <function> defined @Interface\SharedXML\Backdrop.lua:409
SetBackdropBorderColor = <function> defined @Interface\SharedXML\Backdrop.lua:422
bg = <unnamed> {
}
text = <unnamed> {
}
SetBackdrop = <function> defined @Interface\SharedXML\Backdrop.lua:329
ClearBackdrop = <function> defined @Interface\SharedXML\Backdrop.lua:282
__elements = <table> {
}
GetBackdropBorderColor = <function> defined @Interface\SharedXML\Backdrop.lua:409
GetBackdrop = <function> defined @Interface\SharedXML\Backdrop.lua:347
unitEvents = <table> {
}
UNIT_ENTERED_VEHICLE = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:52
style = "Player"
UNIT_EXITED_VEHICLE = <function> defined @Interface\AddOns\NDui\Libs\oUF\ouf.lua:52
SetBackdropGradient = <function> defined @Interface\AddOns\kgPanels\Libs\LibBackdrop-1.0\LibBackdrop-1.0.lua:533
SetBorderBlendMode = <function> defined @Interface\SharedXML\Backdrop.lua:266
C
If I unload my panel to the unitframe and reloadUI everything get back to normal. If I add panel once UI is loaded, everything works as intended til the next reloadUI and restart of the game.
see my screenshot below:
When i add panel, everything is working as intended. My borders stick to unitframes.
Once I reload, I lose my unitframes and get error message.
If ever someone has any clue to what can cause this error and prevent to load my unitframe. Thank You.
Ok as I thought, Kgpanels tried to anchor its texture to oUF before it was created so i had to search and make some tweak in script settings of kgpanels's panel to anchor it after oUF was created.
Problem SOLVED.
for those interested:
OnLoad:
self:RegisterEvent("PLAYER_ENTERING_WORLD")
OnEvent:
self:SetParent(FRAMETOATTACH) <----- change FRAMETOATTACH to the frame you want your panel anchors to.