Thread: Error.

  1. #1

    Error.

    Hi! I'm really not good with addons but a few days ago I decided to try some out again, the interface I came up with is pretty nice but I can't seem to get focus target right.. Each time I try it it gives me an error:


    Date: 2012-08-16 16:40:28
    ID: 2
    Error occured in: AddOn: Bartender4
    Count: 1
    Message: Error: AddOn Bartender4 attempted to call a forbidden function (FocusUnit()) from a tainted execution path.
    Debug:
    [C]: FocusUnit()
    ..\FrameXML\UnitPopup.lua:1562: func()
    ..\FrameXML\UIDropDownMenu.lua:706: UIDropDownMenuButton_OnClick()
    [string "*:OnClick"]:1:
    [string "*:OnClick"]:1
    AddOns:
    Swatter, v5.13.5258 (BoldBandicoot)
    acbCastBar, v11.09.25
    acbMirror, v11.09.25
    ACP, v3.3.17
    agExtras, vr715
    agUnitFrames, vr716
    AzCastBar, v11.09.25
    Babylonian, v5.1.DEV.312(/embedded)
    Bartender4, v4.4.20.1
    Bartender4Dualspec, v
    BeanCounter, v5.13.5258 (BoldBandicoot)
    Configator, v5.1.DEV.312(/embedded)
    CoolLine, v4.3.002
    DBMCore, v
    DebugLib, v5.1.DEV.312(/embedded)
    Enchantrix, v5.13.5258 (BoldBandicoot)
    EnchantrixBarker, v5.13.5258 (BoldBandicoot)
    GladiatorlosSA, vv1.0
    Gladius, vv2.0.16-beta
    Grid, v4.3.4.1512-beta
    Informant, v5.13.5258 (BoldBandicoot)
    InterruptBar, v1.33
    LibExtraTip, v5.12.DEV.319(/embedded)
    MagicRunes, v1.0.90
    MagicRunesIconDisplay, v1.0.90
    MagicRunesRuneBars, v1.0.90
    MailOpener, vv1.2.16
    OmniCC, v4.3.2
    QHDatabase, v4.3.0.244r
    QHDataenUS, v4.3.0.244r
    QuestHelper, v4.3.0.244r
    Recount, v
    SlideBar, v5.13.5258 (BoldBandicoot)
    SpellAlerter, vv2.15
    Stubby, v5.13.5258 (BoldBandicoot)
    TipHelper, v5.12.DEV.315(/embedded)
    BlizRuntimeLib_enUS v4.3.4.40300 <eu>
    (ck=423)

    If any1 could help, please do!

    Frozenhate.

  2. #2
    you cant right click a unit frame and select "set focus" as it calls that error, you need to target whoever you want to focus and type /focus

  3. #3
    Quote Originally Posted by SpaceDuck View Post
    you cant right click a unit frame and select "set focus" as it calls that error, you need to target whoever you want to focus and type /focus
    Wow thanks alot! how did you know that? If I may ask ^^

  4. #4
    Quote Originally Posted by Frozenhate View Post
    Wow thanks alot! how did you know that? If I may ask ^^
    It's been a restriction on all addons since vanilla. You can use a keybind or a macro but can't do it from the dropdown menu.

  5. #5
    Deleted
    Since you're trying to make this for yourself, you'll have to look into the SecureActionButtonTemplate reference (specify "SecureActionButtonTemplate" as arg4 to your CreateFrame call on a Button widget).

    You'll want to SetAttribute type to "focus" and unit to "target" (or whatever unit you're trying to focus). However, as your frame inherits a secure template, it will also have to abide certain restrictions - most importantly, you won't be able to show/hide/move it during combat (InCombatLockdown returns true) - this is also why addon dropdown menus cannot change focus (as they need to work (=open/close) in combat).

    PS: Don't replace the button's OnClick script - it's inherited from the SecureTemplate. Use PreClick/PostClick, or :HookScript.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •