Thread Tools Display Modes
Prev Previous Post   Next Post Next
Unread 01-01-13, 10:14 PM   #1
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 440
focustarget targetting event (solved)

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:
  1. local w = CreateFrame("Frame")
  2. w:RegisterEvent("PLAYER_FOCUS_CHANGED")
  3. function w:OnEvent(event, ...)
  4.   event == "PLAYER_FOCUS_CHANGED" then
  5.   FocusFrameToTPortraitModel:CreateBorder(8,1,1,1)
  6. end
  7. 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.

Last edited by 10leej : 01-02-13 at 12:36 AM. Reason: issue solved
10leej is offline   Reply With Quote
 

Go BackWoWInterface » Developer Discussions » Lua/XML Help » focustarget targetting event

Thread Tools
Display Modes

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