So trying to add the !beautycase border to the focus target frame and I figured
"Well if I just run FocusFrameToTPortraitModel:CreateBorder(8,1,1,1) all I'm gonna get is
"Message: Interface\AddOns\BobUI\modules\unitframes.lua:647: attempt to index global 'FocusFrameToTPortraitModel' (a nil value)"
So I should probably make a script looking like this
Lua Code:
local w = CreateFrame("Frame")
w:RegisterEvent("PLAYER_FOCUS_CHANGED")
function w:OnEvent(event, ...)
event == "PLAYER_FOCUS_CHANGED" then
FocusFrameToTPortraitModel:CreateBorder(8,1,1,1)
end
w:SetScript("OnEvent", w.OnEvent)
So add that stuff to my addon (
whoa unitframes btw) and low and behold I still get
"Message: Interface\AddOns\BobUI\modules\unitframes.lua:647: attempt to index global 'FocusFrameToTPortraitModel' (a nil value)"
when I add a focus something for the first time, but anytime after I do that it works perfectly
So i figured "I must be using the wrong event"
but alas "PLAYER_FOCUS_CHANGED" the only event I found pertaining to the focus target
and now I'm all like "I need more helpz" so i dialed my buddies here at wowinterface and made a thread
FocusFrameToTPortraitModel is the frame created by
adapt for the 3d portraits.