WoW:API SetWhoToUI: Difference between revisions

move comment to talk page
m (→‎Notes: some formatting, and code changes to accomodate those who will copy/paste and want the code to work)
(move comment to talk page)
Line 30: Line 30:


:'''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.
:'''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.
:'''I agree with the above.''' I hooked the ''WhoList_Update'' function instead. This is the function called by the event handler as well as other parts of the code that brings up the FriendsFrame in Who mode. My code is below
OrigWhoList_Update = WhoList_Update;
function WhoList_Update()
  if (not SWALLOW_NEXT_WHO) then
    OrigWhoList_Update();
  end
end
- [[User:Hillie|Hillie]] ([[User talk:Hillie|talk]]) 21:54, 8 May 2008 (UTC)
Anonymous user