Thread Tools Display Modes
01-25-10, 08:05 PM   #21
Dayve
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 15
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:
  1. RaidPartyHandler:Execute("raidhideparty = " .. tostring(GetCVarBool("hidePartyInRaid")));
  2. RaidPartyHandler:SetAttribute("state-unitexists", UnitExists("raid1"));
  Reply With Quote
01-25-10, 10:05 PM   #22
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Originally Posted by Xrystal View Post
Yep, standard addon functionality I'm afraid.
this was linked to me from the bliz forums, posted same question there.

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.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
01-28-10, 09:04 AM   #23
AnrDaemon
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 156
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...
  Reply With Quote
01-28-10, 09:08 AM   #24
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
I have no idea how it works, but it's in my bookmarks:
http://paste.wowace.com/781/
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote
02-26-10, 11:30 AM   #25
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
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....
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
02-26-10, 11:46 AM   #26
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
For hiding protected frames:
Code:
local securehandler = CreateFrame("Frame", nil, nil, "SecureHandlerBaseTemplate")
securehandler:WrapScript(Frame, "OnShow", "self:Hide()")
For the focus problem, look at the code of ncHoverFocus.
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote
02-26-10, 12:06 PM   #27
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
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.
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
02-26-10, 12:45 PM   #28
Shadowed
...
Premium Member
Featured
Join Date: Feb 2006
Posts: 387
Originally Posted by Grimsin View Post
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.
Can you describe what you are trying to do exactly? Reading through the posts was more confusing than anything.

Originally Posted by Grimsin View Post
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....
Clique uses the focus attribute which is called by the secure code to set focus. The menu function calls SetFocus which when it gets tainted (and it gets tainted easily) doesn't work. They're two different systems. No UF addon can get around the set focus bug, without reimplementing the entire dropdown system in secure code, and nobody is insane enough to do that.

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.
  Reply With Quote
02-26-10, 01:16 PM   #29
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
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
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote
02-26-10, 03:41 PM   #30
Shadowed
...
Premium Member
Featured
Join Date: Feb 2006
Posts: 387
Originally Posted by Grimsin View Post
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
Not sanely, correct. It's something Blizzard has to fix.

See the other topic about the frame issue.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » darn taint

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