darn taint
what should i do about this?
1x <event>ADDON_ACTION_BLOCKED:AddOn '!GrimUI' tried to call the protected function 'PartyMemberFrame1:Hide()'. <in C code>: in function `Hide' Interface\FrameXML\PartyMemberFrame.lua:111: in function `PartyMemberFrame_UpdateMember': Interface\FrameXML\PartyMemberFrame.lua:317: in function `PartyMemberFrame_OnEvent': <string>:"*:OnEvent":1: in function `OnEvent' Interface\FrameXML\UnitFrame.lua:417: in function <Interface\FrameXML\UnitFrame.lua:415>: |
You're trying to hide stuff during combat, which you can't do.
|
yes you can.
Im just not sure how. I think i may have fixed that problem by disabling the onevent and setscript for the partyframes. Problem though is how to hide my own partyframes when changing to a raid and in combat.... somehow you can show/hide secure frames in combat does anyone know? i know this much... i think it has to do with doing a setattribute but im not sure how to do a setattribute with my own function in it... wowwikki gets hard to follow on this area... |
dunno if this is what will work for you, but...
something that worked for me in Aloft was to UIObject:SetAlpha() to zero (0). a bit tricky with nameplates, as this leaves the frame assembly "invisible" but still sensitive to the mouse, which can generically affect clicking on the WorldFrame, but Frame:EnableMouse() is also protected in combat (which resulted in disabled nameplate frame assemblies being recycled in combat, and then coming back into range assigned to a different unit but with the mouse still disabled; this might be less a problem with something static like a unit frame). edit: depending on the nature of the object being hidden, it is my perception that Region:Hide() can indeed be "protected" in combat. this is true of the root frame in a nameplate assembly, for instance. |
it is protected in deed. If i understand things right you can use SetAttribute with a secure template of somekind to hide show frames in combat.
--- edit --- heh just ran into a related issue. hiding the party frames is not only protected i used register unit watch to show/hide them in the first place how the heck do i hide those now? lol. need to hide them when joining a raid.... |
Wouldn't it be easier ( assuming it's possible ) to have the attributes mark the frame as "player", "party1", "raid1" as required depending on the situation. That way you won't need to hide the frame at all.
|
one would think right but the problem is blizzards api does not automaticlly hide party frames when you change to a raid.....or at lest i dont thnk it does lol.
-- Okay it does but my frames are named different. SO of course it does not hide them on its own. fixed that part except of course it most likly will not do it in combat. -- another edit -- i either need to make it hold off doing anything that would be secure until combat ends or figure out how to show/hide frames in combat. |
I'm not sure we're talking about the same thing as I only read the current page of comments but,
there _is_ a setting in the default client to hide party interface when joining a raid. It's under Options(Esc)->Interface->Game tab->UnitFrames->"Hide party interface in Raid". |
I managed to accomplish this in my own unit/raid frames by parenting the party frames to one frame and hiding that frame using a SecureHandlerStateTemplate (which also doubles as the main table for the addon).
Creation: lua Code:
lua Code:
lua Code:
|
That is exactly what im talking about :)
so that last part about the settings, that registers it to function based on the users selection in the blizzard options as far as raid party hide? trying right now to work this into my code :) thanks a lot! |
It uses the setting in my mod's saved variables, replace self.save.raidhideparty with whatever variable you want the setting to come from; I think the default UI setting is in HIDE_PARTY_INTERFACE
|
so the hide party in raid is an option you have in your addon?
im kinda over whelmed atm, everything got real complicated when it came to party frames since i made it so there was different party layouts to accommodate for various screen sizes. The way i did things the majority of the ui size and scale never changes just two pieces of art those two pieces of art dictate that action button space and... you guessed it the party member and raid member space. so let me see if i under stand. you hook the partyframes that have the unitwatch party1 so on and soo on to the secure handler for the raid watch part? |
Quote:
Your understanding is pretty much correct; to put things clearly: the party frames are individually shown/hidden as normal using unitwatch, and their shared parent frame is shown/hidden by the state handler (which can be the parent frame itself, or another frame as in my code) using a secure code snippet that responds to unitwatch state for the raid1 unit. |
no luck yet.... :( i think it has to do with to many frames hooked to each other it does not show hide the right ones or something.... i dont know. the base looks like this
lua Code:
|
FIGURED IT OUT!! thanks a lot ! :)
|
now trying to make the variable it checks come from theblizzard one but... not happening so far.
how would you check the blizz variables in this case? getcvar in the brackets does nothing |
Quote:
eg. local uiScaling = GetCVar("useUiScale"); local uiScale = tonumber(GetCVar("uiScale")); I use those in my nUI InfoPanel plugins when I need to ensure scaling values in the options are taken into account. Example : FontSize 10 at scale of 1.0 would be too small at scale or 0.6 so I check the scale and then use a higher fontsize so that it still looks fine. |
yea the problem is i cant put those into secure template functions. or at lest em not sure how i think they need to be woven into the execute but..
|
just found out that set focus on the dropdown menu is blocked for my party and player frames :(
|
Quote:
|
For the user setting to work the code snippet that runs in response to state change needs to reference the setting in a variable in its restricted environment; in the code I provided it is stored in "raidhideparty". After initialization and whenever the user setting changes it must be propagated into the restricted enviroment using :Execute, which is the purpose of the 3rd code extract in my first post, which effectively sets "ridehideparty" to be equal to the value in the user setting variable. That part could also be written like this for clarity (with the appropriate CVar used):
lua Code:
|
Quote:
http://forums.wowace.com/showthread.php?t=16669 i also had another idea.... what if... one were to take over the bliz function for setfocus on the drop down and replace it with lua code that runs the /focus slash cmd, and create your own setfocus frame that opens on unit watch.. if the bliz focus frame works on unitwatch then you dont need to make your own even. assuming the macro will fire from lua while in combat. that work around that i posted the link to looks dicey to me but then im still a coding noob imo. |
I'm using keybind (Alt+F) to set focus.
I saw many discussions about addon being unable to set focus, and to create a macro for "/focus", but I'm failing to see how that would be more useful... |
I have no idea how it works, but it's in my bookmarks:
http://paste.wowace.com/781/ |
it is doable a few addons do it. One in particular is Clique. Although it does not appear to use the actual menu function. However this would mean one way or another you can make an addon setfocus its just a mater of how to make that menu feature setfocus. Its really something blizz should be fixing....
|
For hiding protected frames:
Code:
local securehandler = CreateFrame("Frame", nil, nil, "SecureHandlerBaseTemplate") |
did you see the post about the arena frames? how would i work the secure show hide into whats being talked about there? the biggest problems right now are the show hiding of raid and party frames, and the secure show/hide of secure button frames of various sorts, not action bars but like the spellbook frame, those are secure buttons so if you screw around with the size or position or show/hide of that frame it has to be done secure or you get taint when in combat.
|
Quote:
Quote:
The pastey nightcracker linked was broken with 3.2 (3.1?), it was technically a loophole that caused it to work in the first place. |
So there is just no fix to the menu setfocus issue?
As for the frame showing and hiding well the problem is my party frames do not always show hide as they should. one of the times its an issue is if you drop raid while in combat. or join raid in combat... or for that mater do anything in combat :) the other thread has the actual code pasted. http://www.wowinterface.com/forums/s...ad.php?t=30923 |
Quote:
See the other topic about the frame issue. |
All times are GMT -6. The time now is 12:03 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI