Thread Tools Display Modes
04-15-12, 01:47 AM   #1
nandolonn
A Defias Bandit
Join Date: Jul 2011
Posts: 2
Focus Target

HI!

Today i did a focus hex macro for my shaman and this is what hapened.

I did the macro as i've learned and everything's goin good so far.
But then i ran into to the problem, u can't even focus target on nUI!

It says that an error occured when u try to focus a target, plz fix this or tell me what to do.!

This is what happens:


Date: 2012-04-15 10:20:14
ID: 15
Error occured in: AddOn: nUI
Count: 1
Message: Error: AddOn nUI attempted to call a forbidden function (FocusUnit()) from a tainted execution path.
Debug:
[C]: FocusUnit()
..\FrameXML\UnitPopup.lua:1518:
..\FrameXML\UnitPopup.lua:1289
[C]: func()
..\FrameXML\UIDropDownMenu.lua:706: UIDropDownMenuButton_OnClick()
[string "*:OnClick"]:1:
[string "*:OnClick"]:1
AddOns:
Swatter, v5.13.5258 (BoldBandicoot)
NPCScan, v4.3.0.1
ACP, v3.3.17
Altoholic, v4.2.002
ArmoryQuickLink, v2.1
Atlas, v1.21.0
AtlasLootLoader, vv6.05.04
AtlasQuest, v4.6.7
Auctionator, v3.0.0
Babylonian, v5.1.DEV.312(/embedded)
BagnonForever, v
BeanCounter, v5.13.5258 (BoldBandicoot)
Carbonite, v4.3
CarboniteTransfer, v1.01
Combuctor, v4.3.0
CombuctorSets, v
Configator, v5.1.DEV.312(/embedded)
CrapnGray, v1.0.2
DataStore, v4.2.002
DataStoreAchievements, v4.2.002
DataStoreAgenda, v4.2.002
DataStoreAuctions, v4.2.002
DataStoreCharacters, v4.2.002
DataStoreContainers, v4.2.002
DataStoreCrafts, v4.2.002
DataStoreCurrencies, v4.2.002
DataStoreInventory, v4.2.002
DataStoreMails, v4.2.002
DataStorePets, v4.2.002
DataStoreQuests, v4.2.002
DataStoreReputations, v4.2.002
DataStoreSpells, v4.2.002
DataStoreStats, v4.2.002
DataStoreTalents, v4.2.002
DBMCore, v
DebugLib, v5.1.DEV.312(/embedded)
Enchantrix, v5.13.5258 (BoldBandicoot)
EnchantrixBarker, v5.13.5258 (BoldBandicoot)
Gatherer, v3.2.4
GearScore, v4.10.01.00
GladiatorlosSA, v430.02
Gladius, vv2.0.16-beta
HealBot, v4.3.0.0
HealersHaveToDie, v1.9.1.2
Icicle, v0.8
Incognito, v1.1.5
Informant, v5.13.5258 (BoldBandicoot)
InterruptAnnouncer, v1.0
LibExtraTip, v5.12.DEV.319(/embedded)
MailGet, v
MarketWatcher, v2.13
nUI, v5.07.24 (Plus)
nUIInfoPanelDualStats, v5.07.19
Omen, v3.1.4
Recount, v
SafeQueue, vv1.26
SlideBar, v5.13.5258 (BoldBandicoot)
Stubby, v5.13.5258 (BoldBandicoot)
TauntMaster, v4.1.1
TidyPlates, v6.6.Beta2 (R444)
TidyPlatesGraphite, v
TidyPlatesGrey, v
TidyPlatesNeon, v
TidyPlatesQuatre, v
TidyPlatesHub, vR444
TidyPlatesWidgets, vR443
TipHelper, v5.12.DEV.315(/embedded)
TradeSkillMaster, vv0.2.2Beta
TradeSkillMasterAuctionDB, vv0.3.3Beta
TradeSkillMasterAuctioning, vv0.3Beta
TradeSkillMasterCrafting, vv0.3.0.1Beta
TradeSkillMasterGathering, vv0.2.3Beta
TradeSkillMasterMailing, vv0.2.1Beta
TradeSkillMasterShopping, vv0.2.4.1Beta
BlizRuntimeLib_enUS v4.3.3.40300 <eu>
(ck=836)

Last edited by nandolonn : 04-15-12 at 02:22 AM.
  Reply With Quote
04-15-12, 03:29 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,322
First to note, this is an addon error, not a macro one. Understanding that, we need to find out what addon is really causing taint. The error may say it's nUI, but it has been known to blame random addons when the taint is self-generated inside the default UI.

In order to test this, the error needs to reliably be thrown, meaning every time you do a specific set of steps, the error is guaranteed to fire.

If you can get the error to fire consistently, you need to first disable nUI and see if Blizzard was right in blaming it. If it pops up again, you'll need to go through your addons, enabling and disabling groups of them to single out which one is causing the trouble.

Another note, There are at least a couple addons that have modules and dependencies loaded that will refuse to load without them. An example of this is Altoholic that runs off of DataStore and its modules. Be sure to treat these occurrences as a single addon.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
04-15-12, 06:17 AM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,917
Did you try to focus using the click menu on the unit frames ? If so that is a standard problem with addons that customise the unit frames. You need to use the /focus /clearfocus slash commands instead.
__________________
  Reply With Quote
04-15-12, 08:04 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Basically, if you use any custom unit frame addon or any addon which uses dropdown menus, there's a 99.99% chance you will simply never be able to set your focus from a unit frame right-click dropdown menu.

Your options are as follows:

1. Bind a key to the "Focus Target" function in the Blizzard Key Bindings UI. Then, target the unit you want to set as your focus, and press that key.

2. Make a macro that just says "/focus" and drop it on an action button, and then click on the action button or press the key bound to the action button.

3. Type "/focus" by hand every time you want to change your focus target. You generally do not need to use the "/clearfocus" command, as using "/focus" when you do not have a target will clear your focus unit.

4. Write a macro that automatically focuses the unit you cast Hex on. For example, the following macro will first set your focus unit to your current target if you (a) do not already have a hostile focus unit or (b) are pressing the shift key, and then cast Hex on your focus unit.

Code:
/focus [@focus, noharm] [mod:shift]
/cast [@focus] Hex
  Reply With Quote
04-18-12, 07:09 PM   #5
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
Originally Posted by Phanx View Post
Basically, if you use any custom unit frame addon or any addon which uses dropdown menus, there's a 99.99% chance you will simply never be able to set your focus from a unit frame right-click dropdown menu.

Your options are as follows:

1. Bind a key to the "Focus Target" function in the Blizzard Key Bindings UI. Then, target the unit you want to set as your focus, and press that key.

2. Make a macro that just says "/focus" and drop it on an action button, and then click on the action button or press the key bound to the action button.

3. Type "/focus" by hand every time you want to change your focus target. You generally do not need to use the "/clearfocus" command, as using "/focus" when you do not have a target will clear your focus unit.

4. Write a macro that automatically focuses the unit you cast Hex on. For example, the following macro will first set your focus unit to your current target if you (a) do not already have a hostile focus unit or (b) are pressing the shift key, and then cast Hex on your focus unit.

Code:
/focus [@focus, noharm] [mod:shift]
/cast [@focus] Hex
Hey can you not use secure actions to focus the target, or is it the Custom Unit Frames that cause the issue?
  Reply With Quote
04-18-12, 09:25 PM   #6
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Originally Posted by Fox536 View Post
Hey can you not use secure actions to focus the target, or is it the Custom Unit Frames that cause the issue?
The way I understand the problem is the menu shows/hides in combat so it will be tainted the moment you use it.
This works for blizz-code but not other unitframes.
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
04-18-12, 09:28 PM   #7
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
Originally Posted by Rilgamon View Post
The way I understand the problem is the menu shows/hides in combat so it will be tainted the moment you use it.
This works for blizz-code but not other unitframes.
oh wow, I must of miss read something somewhere I could of sworn you could hide/show as long as you did it in secure code. I'll have to re-read that, and that's sad.
  Reply With Quote
04-19-12, 12:57 PM   #8
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Fox536 View Post
Hey can you not use secure actions to focus the target, or is it the Custom Unit Frames that cause the issue?
Any non-Blizzard code in the path that causes the menu to open can cause the taint. Same goes for any non-Blizzard code that adds, removes, or modifies buttons in a dropdown menu.

I did, however, think of another option that wasn't in my last post:

5. Use click-casting to assign a click combination on unit frames for setting your focus, eg. Ctrl + Right-Click on a unit frame to set that unit as your focus. The easiest way to implement this would be to use the addon Clique.
  Reply With Quote
04-19-12, 01:23 PM   #9
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
Originally Posted by Phanx View Post
Any non-Blizzard code in the path that causes the menu to open can cause the taint. Same goes for any non-Blizzard code that adds, removes, or modifies buttons in a dropdown menu.

I did, however, think of another option that wasn't in my last post:

5. Use click-casting to assign a click combination on unit frames for setting your focus, eg. Ctrl + Right-Click on a unit frame to set that unit as your focus. The easiest way to implement this would be to use the addon Clique.
is it opening the menu that causes it or the action, cause if it's the action then that should able to be fixed using the secure attribute "macrotext" and "/focus x" where x id the unitframe's target name or something similar. if it's the show/hide I thought that u could do that with a direct frame reference in the secure on click handler?

I'm not trying to argue just better understand the problem, any details would be great.
  Reply With Quote
04-19-12, 01:26 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Personally, I don't know all the details, as I've never written or maintained any addons that involve showing a drop-down unit menu, but there is a thread over on WowAce somewhere with all the details, and a way to work around it in some cases... though it was pretty old, so I'm not sure the workaround still works, and since none of the major unit frame addons implemented it, there was probably something wrong with it anyway.
  Reply With Quote
04-19-12, 01:31 PM   #11
Fox536
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2012
Posts: 31
Originally Posted by Phanx View Post
Personally, I don't know all the details, as I've never written or maintained any addons that involve showing a drop-down unit menu, but there is a thread over on WowAce somewhere with all the details, and a way to work around it in some cases... though it was pretty old, so I'm not sure the workaround still works, and since none of the major unit frame addons implemented it, there was probably something wrong with it anyway.
oh well if it was my addon I'd try and fix it or find a work around but I'm not about to start poking in someone else's addon and making any kind of changes lol
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Focus Target

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