Thread Tools Display Modes
01-09-11, 02:23 PM   #1
barbol12
A Cyclonian
 
barbol12's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 42
set focus bugged??

hey guys.. i just got done making my oUF frames.... and seem to be having a trouble with 1 thing... i cant set focus on anything... my focus frame will not work, at all. it comes up with that window, saying this action has been blocked due to the blizzard UI, blah blah, or something like that . is it just me or other ppl having this same problem.
  Reply With Quote
01-09-11, 03:36 PM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
This is an issue with so to say all unit frame add-ons. We can't reliably recreate the menus with the secure environment, rendering us unable to do things such as SetFocus().

The "solution" is to use /focus.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
01-09-11, 03:56 PM   #3
barbol12
A Cyclonian
 
barbol12's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2010
Posts: 42
ok, thanks a whole heap man. forgot about the chat command focus setting
  Reply With Quote
01-09-11, 07:18 PM   #4
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
To make life a little easier, I'm using this

Code:
-- set/clear focus with shift + left click
    local ModKey = 'Shift'
    local MouseButton = 1
    local key = ModKey .. '-type' .. (MouseButton or '')
	if(self.unit == 'focus') then
		self:SetAttribute(key, 'macro')
		self:SetAttribute('macrotext', '/clearfocus')
	else
		self:SetAttribute(key, 'focus')
	end
and this
Code:
-- remove SET_FOCUS & CLEAR_FOCUS from menu, to prevent errors
do 
    for k,v in pairs(UnitPopupMenus) do
        for x,y in pairs(UnitPopupMenus[k]) do
            if y == "SET_FOCUS" then
                table.remove(UnitPopupMenus[k],x)
            elseif y == "CLEAR_FOCUS" then
                table.remove(UnitPopupMenus[k],x)
            end
        end
    end
end
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » set focus bugged??


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