Thread Tools Display Modes
10-08-10, 04:01 AM   #1
Eveigh
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 6
How do I make right-click menu for ToT frame?

Hello!
I'm little confused. I use the following code to implement right-click menus on frames:
Code:
local function menu(self)
	local dropdown = _G[string.format('%sFrameDropDown', string.gsub(self.unit, '(.)', string.upper, 1))]

	if dropdown then
		ToggleDropDownMenu(1, nil, dropdown, 'cursor')
	elseif (self.unit:match('party')) then
		ToggleDropDownMenu(1, nil, _G[format('PartyMemberFrame%dDropDown', self.id)], 'cursor')
	else
		FriendsDropDown.unit = self.unit
		FriendsDropDown.id = self.id
		FriendsDropDown.initialize = RaidFrameDropDown_Initialize
		ToggleDropDownMenu(1, nil, FriendsDropDown, 'cursor')
	end
end
Thanks to yj589794.
It is working for all frames, except ToT frame. On ToT frame it gives me error:
Code:
Message: Interface\FrameXML\UnitPopup.lua:751: Usage: GetRaidRosterInfo(index)
Time: 10/08/10 15:58:38
Count: 6
Stack: [C]: in function `GetRaidRosterInfo'
Interface\FrameXML\UnitPopup.lua:751: in function `UnitPopup_HideButtons'
Interface\FrameXML\UnitPopup.lua:209: in function <Interface\FrameXML\UnitPopup.lua:190>
[C]: in function `UnitPopup_ShowMenu'
Interface\AddOns\Blizzard_RaidUI\Blizzard_RaidUI.lua:661: in function `initFunction'
Interface\FrameXML\UIDropDownMenu.lua:69: in function `UIDropDownMenu_Initialize'
Interface\FrameXML\UIDropDownMenu.lua:737: in function `ToggleDropDownMenu'
Interface\AddOns\oUF_Jir\jir.lua:147: in function `handler'
Interface\FrameXML\SecureTemplates.lua:529: in function `SecureActionButton_OnClick'
Interface\FrameXML\SecureTemplates.lua:570: in function <Interface\FrameXML\SecureTemplates.lua:562>

Locals: (*temporary) = nil
Can somebody give me some insight? I can't understand why it calls GetRaidRosterInfo, nor how to make it not to do that.
BTW, it's for live, not for beta/ptr.
Thanks!
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » How do I make right-click menu for ToT frame?


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