Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:API SetWhoToUI
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} __NOTOC__ Sets where the result of a [[API SendWho]] request will be handled. SetWhoToUI(state); == Parameters == === Arguments === :(State) :;State : Number - If set to 1, the result of a SendWho will always be returned as a WHO_LIST_UPDATE event. If set to 0 then the result of a SendWho will be returned as a CHAT_MSG_SYSTEM if the list is short, but as a WHO_LIST_UPDATE if the list is long. (from WoW forums) === Returns === :Nothing. === Notes === :During [[User:Noccy|my]] experiments with this function, the Who dialog still popped up. However, this can be avoided by using FriendsFrame:Hide(); or a combination of FriendsFrame:UnregisterEvent("WHO_LIST_UPDATE"); and FriendsFrame:RegisterEvent("WHO_LIST_UPDATE"); :Another way (perhaps slightly less complex, and easier to get to work with other addons) of avoiding the Who window popping up is to hook the <tt>FriendsFrame_OnEvent</tt> function and not letting the original handle <tt>WHO_LIST_UPDATE</tt> events when your own code is waiting for a reply. ''Example:'' function my_FriendsFrame_OnEvent() if not(event == "WHO_LIST_UPDATE" and iAmWaitingForAReply) then original_FriendsFrame_OnEvent(); end end original_FriendsFrame_OnEvent = FriendsFrame_OnEvent; FriendsFrame_OnEvent = my_FriendsFrame_OnEvent; :Of course your code should make sure to reset <tt>iAmWaitinForAReply</tt> periodically (e.g. in case you never get a reply!), and you should probably read [[HOWTO:_Hook_a_Function]] for more info on that subject. :'''Note - Hooking FriendsFrame's OnEvent handler is a really bad idea''', because FriendsFrame contains the raid tab. This would likely cause you a lot of problems with the new secure framework. Using FriendsFrame:Hide() is also probably not a good idea unless you're absolutely sure when your code is going to be run. Otherwise, you may inadvertantly hide the FriendsFrame when the player is using it.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)