Thread Tools Display Modes
04-07-13, 12:58 AM   #1
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
raid frames menu problem

Keep getting this fun little error when right clicking on raid frames:

Code:
11x FrameXML\UnitPopup.lua:940: Usage: GetRaidRosterInfo(index)
<in C code>
FrameXML\UnitPopup.lua:940: in function "UnitPopup_HideButtons"
FrameXML\UnitPopup.lua:267: in function "UnitPopup_ShowMenu"
FrameXML\SecureTemplates.lua:239: in function "initFunction"
FrameXML\UIDropDownMenu.lua:69: in function "UIDropDownMenu_Initialize"
FrameXML\UIDropDownMenu.lua:864: in function "ToggleDropDownMenu"
FrameXML\SecureTemplates.lua:310: in function "handler"
FrameXML\SecureTemplates.lua:632: in function "SecureActionButton_OnClick"
FrameXML\SecureTemplates.lua:672: in function <FrameXML\SecureTemplates.lua:664>

Locals:
dropdownMenu = SecureTemplatesDropdown {
0 = <userdata>
displayMode = "MENU"
openedFor = oUF_Raid25UnitButton1 {}
initialize = <func> @FrameXML\SecureTemplates.lua:196
server = "Frostmane"
name = "Drúedain"
which = "RAID"
unit = "raid2"
}
inInstance = 1
instanceType = "raid"
inParty = 1
inRaid = 1
isLeader = 0
isAssistant = 0
inBattleground = 0
canCoop = 1
haveBattleTag = true
(for generator) = <func> =[C]:-1
(for state) = <table> {
1 = "SET_FOCUS"
2 = "MUTE"
3 = "UNMUTE"
4 = "RAID_SILENCE"
5 = "RAID_UNSILENCE"
6 = "BATTLEGROUND_SILENCE"
7 = "BATTLEGROUND_UNSILENCE"
8 = "RAID_LEADER"
9 = "RAID_PROMOTE"
10 = "RAID_MAINTANK"
11 = "RAID_MAINASSIST"
12 = "LOOT_PROMOTE"
13 = "RAID_DEMOTE"
14 = "VOTE_TO_KICK"
15 = "RAID_REMOVE"
16 = "PVP_REPORT_AFK"
17 = "MOVE_PLAYER_FRAME"
18 = "MOVE_TARGET_FRAME"
19 = "REPORT_PLAYER"
20 = "CANCEL"
}
(for control) = 10
index = 10
value = "RAID_MAINTANK"
I have no idea what it means.
  Reply With Quote
04-07-13, 07:24 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
It is a Blizzard bug. The new togglemenu will not work for raid units. It will however for party units.

You would need to rewrite togglemenu with menu for raid units. Which is pretty meh if you ask me.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
04-07-13, 09:37 AM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Originally Posted by zork View Post
It is a Blizzard bug. The new togglemenu will not work for raid units. It will however for party units.

You would need to rewrite togglemenu with menu for raid units. Which is pretty meh if you ask me.
Then you'd also have to remove set focus from raid units. Even then set focus remains bugged when you set it from the player dropdown on the raid frame.
  Reply With Quote
04-07-13, 11:52 AM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Yes. The best suggestion is just keep it that way. You can target that raid unit and use the target menu. Post those bugs in the official Blizzard forums that is all we can do.

It will probably never get fixed.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
04-07-13, 04:36 PM   #5
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
Don't be that negative Zork, Set Focus got fixed ... partially ... after 4 expansions ...
  Reply With Quote
04-07-13, 05:02 PM   #6
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Rainrider View Post
Don't be that negative Zork, Set Focus got fixed ... partially ... after 4 expansions ...
I think their UI guy retired after WoW was released. They've been dragging him out of retirement occasionally for work, but he don't appreciate it.

"Bob, wait! There's still bugs in the drop-down menu!"
"Screw you guys, I'm going on a tour around the world. I'll pop back in and say hi sometime next year.... maybe. Oh, and why don't you hire yourselves a real interface developer?!"
"We're not made of money, Bob. We're Blizzard!"
  Reply With Quote
04-09-13, 03:07 AM   #7
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
eh ok but how would a go about solving this issue? Removing the rightclick option entirely?

This is the code i have:
Code:
-- Right Click Menu
lib.spawnMenu = function(self)
	local unit = self.unit:sub(1, -2)
	local cunit = self.unit:gsub("^%l", string.upper)

	if(cunit == "Vehicle") then
		cunit = "Pet"
	end

	if(unit == "party") then
		ToggleDropDownMenu(1, nil, _G["PartyMemberFrame"..self.id.."DropDown"], "cursor", 0, 0)
	elseif(_G[cunit.."FrameDropDown"]) then
		ToggleDropDownMenu(1, nil, _G[cunit.."FrameDropDown"], "cursor", 0, 0)
	elseif unit == "raid" then
		FriendsDropDown.unit = self.unit
		FriendsDropDown.id = self.id
		FriendsDropDown.initialize = RaidFrameDropDown_Initialize
		ToggleDropDownMenu(1,nil,FriendsDropDown,"cursor")
	end
end
and this i think:S
Code:
-- The Shared Style Function
local GlobalStyle = function(self, unit, isSingle)

	self.menu = lib.spawnMenu
	self:RegisterForClicks('AnyDown')

	-- Call Unit Specific Styles
	if(UnitSpecific[unit]) then
		return UnitSpecific[unit](self)
	end
end

-- The Shared Style Function for Party and Raid
local GroupGlobalStyle = function(self, unit)

	self.menu = lib.spawnMenu
	self:RegisterForClicks('AnyDown')

	-- Call Unit Specific Styles
	if(UnitSpecific[unit]) then
		return UnitSpecific[unit](self)
	end
end
  Reply With Quote
04-09-13, 03:29 PM   #8
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You didn't actually post the code that's adding that spawnMenu function, but basically you can replace that whole part with:

Code:
if unit:match("^raid") then
    frame:SetAttribute("type2", "menu")
else
    frame:SetAttribute("type2", "togglemenu")
end
You don't need to write your own function to toggle the menu anymore.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-10-13, 03:11 AM   #9
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
I didn't? just found what i could that had spawnmenu in it:P
And i think you have to "spoon-feed" me a little bit more. Replacing the code with the thing you wrote does not work(fatality!).
The stuff i found is from two different files(core and lib).
  Reply With Quote
04-10-13, 04:52 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
There should be somewhere in the code that looks something like this:

Code:
frame.menu = lib.spawnMenu
frame:SetAttribute("type2", "menu")
Find the part where the spawnMenu function is actually attached to the frame, and post that.

Also, without knowing what you replaced with what I wrote, or what the variables are actually named in that context, I can't even begin to help you with the error.

You should really just post your entire code when asking for help. Posting just a few snippets you think are relevant is generally useless, and leads to everyone wasting time going back and forth like this trying to get more parts of the code.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-11-13, 05:34 AM   #11
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
I'm sorry but i can not find anymore that has "spawnmenu" in it. And i don't really know how it works, so i don't know what to post
I'm using the oUF_fail layout, which has not been updated. There really isn't more to it then a core, lib and tag file.
  Reply With Quote
04-12-13, 02:54 AM   #12
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
1. Make sure you have the latest version of oUF.

2. Remove the entire lib.spawnMenu function.

3. Remove all instances of this line:
Code:
self.menu = lib.spawnMenu
4. Find this line in core.lua:
Code:
self.mystyle = "raid"
...and add this on a new line right after it:
Code:
self:SetAttribute("*type2", "menu")
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-12-13, 05:23 AM   #13
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
1. Latest version is installed.
2. Removed function.
3. Every mention of lib.spawnMenu is gone.
4. Added self:SetAttribute("*type2", "menu").
Error is gone but, nothing happens on rightclick

Edit: Fixed it. Used freeUI's workaround.

Last edited by lynce : 04-13-13 at 01:24 PM.
  Reply With Quote
04-18-13, 04:09 AM   #14
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by lynce View Post
Edit: Fixed it. Used freeUI's workaround.
You should probably post what the workaround is, so others who are looking at the forums for the solution to this problem can benefit, instead of them having to go dig through freeUI and try to figure it out themselves.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-19-13, 04:16 AM   #15
lynce
A Cyclonian
 
lynce's Avatar
Join Date: Jul 2008
Posts: 48
Your right. This is basically what i used: https://github.com/Haleth/FreeUI/com...bdff1bc5ff8c50
  Reply With Quote
04-19-13, 05:38 PM   #16
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Ah, you actually have to use the manual menu on raid frames... I don't understand why Blizzard doesn't get this stuff right in the first place, and then just leaves it broken for so long. It's not like it's hard to reproduce or solve. They've been bragging about their new "mini patch" system that lets them force you to look at the launcher for 1-5 minutes every time they want to tweak something that should have been blatantly obvious on the PTR -- hotfixes to buff/nerf abilities by 25%? how do you go live with something that needs such a major change? -- and they could certainly include UI code fixes in those patches. ಠ_ಠ
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-20-13, 12:04 PM   #17
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Phanx View Post
Ah, you actually have to use the manual menu on raid frames... I don't understand why Blizzard doesn't get this stuff right in the first place, and then just leaves it broken for so long.
It's actually us, the authors, patching these files. We ****ed up here, not Blizzard.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
04-20-13, 06:23 PM   #18
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
But the fact that Blizzard added the "togglemenu" attribute specifically so that addons didn't have to manually set up and show a tainted menu, and then failed to make it work for raid units, is hardly our fault.

See also the BlizzBugsSuck addon -- all of the bugs it works around affect the default UI, and some of them around have been around for multiple expansions. Blizzard could literally just copy and paste the code from the addon, but they apparently can't be bothered to allocate 30 seconds of developer time to fixing the problem.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » raid frames menu problem


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