Thread Tools Display Modes
10-05-18, 06:28 PM   #1
cosmabgd
A Murloc Raider
Join Date: Oct 2018
Posts: 6
dropdown menu not working

Hello . The drop down menu from the configuration addon is not working when i mouse over or click .Can you help me with the code or you can tell what are the changes in 8.0 that can make this problem ?
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_100518_095851.jpg
Views:	372
Size:	450.5 KB
ID:	9128  
Attached Files
File Type: lua TauntMaster2.lua (6.7 KB, 100 views)
File Type: lua TauntMasterConfig.lua (12.7 KB, 95 views)
File Type: lua TauntMasterGUI.lua (16.6 KB, 98 views)
  Reply With Quote
10-05-18, 07:34 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
1. Have you used an error display addon like bugsack/buggrabber to catch any errors? This will let you know if there are any programmable errors, it will point to ( usually ) the line of code that triggered the error and the trace back to the addon code that called it.
Link: http://www.wowinterface.com/download...5-BugSack.html
Link: https://www.wowinterface.com/downloa...ugGrabber.html

2. Have you looked at the several forum posts regarding what has been identified as changed since the BfA Alpha went live months ago ? This will help you understand what and how things have changed that may be causing your problems.
Link: http://www.wowinterface.com/forums/f...play.php?f=175

3. With an addon like TauntMaster, I would suspect that the many spell related code changes are the cause. You would have to locate the offending lines and replace them with correct coding. This is almost the norm with each expansion. It could also be connected to the many template objects used. And that was after a quick glance. Using those addons mentioned in item 1 will help identify the offending lines.
__________________
  Reply With Quote
10-08-18, 07:53 PM   #3
cosmabgd
A Murloc Raider
Join Date: Oct 2018
Posts: 6
Hello. thank you for your suggestion to find the bugs . i get some bugs after 1 hour of playing but i don't think the problem with the dropmenu is from this error :
"
22x TauntMaster2\Gui\TauntMasterGUI.lua:183: attempt to index local 'powerColor' (a nil value)
TauntMaster2\Gui\TauntMasterGUI.lua:183: in function `TauntMasterGUI_UnitFrames_ResetPowerBar'
TauntMaster2\Gui\TauntMasterGUI.lua:195: in function `TauntMasterGUI_UnitFrames_ResetUnitButton'
TauntMaster2\Gui\TauntMasterGUI.lua:57: in function `handler'
TauntMaster2\Gui\TauntMasterGUI.lua:290: in function <TauntMaster2\Gui\TauntMasterGUI.lua:283>

Locals:
InCombatSkipped"


I think my problem is here :

"function Left_Spell_initialize(self,level)
local info
local tm2numTabs = GetNumSpellTabs()

for BookTabs = 1,tm2numTabs do
local name,texture,offset,numSpells = GetSpellTabInfo(BookTabs)

local currentSpec = GetSpecialization()
local currentSpecName = currentSpec and select(2, GetSpecializationInfo(currentSpec)) or select(1, UnitClass("player"))

if BookTabs == 1 or name == currentSpecName then
if level == 1 then
info = UIDropDownMenu_CreateInfo()
info.text = (name .. " Submenu")
info.value = name
info.isTitle = true
info.hasArrow = true
UIDropDownMenu_AddButton(info, level)
end
end
--print("Spell tab \"" .. name .. "\" contains spells from id " .. offset + 1 .. " through " .. offset + numSpells)
for BookSpells = offset + 1,offset + numSpells do
--TauntMaster2.db.char.Spellbook[name] = TauntMaster2.db.char.Spellbook[name] or {}

local skillName = GetSpellBookItemName(BookSpells, "spell")

if BookTabs <=5 then
if (IsAttackSpell(BookSpells, "spell")) then
--print(tmpspellid , skillName )
end
end
if ((IsHarmfulSpell(BookSpells, "spell") or IsHelpfulSpell(BookSpells, "spell")) and not (IsPassiveSpell(BookSpells, "spell"))) or (IsAttackSpell(BookSpells, "spell")) then

if (IsSpellKnown(select(7, GetSpellInfo(BookSpells, "spell"))) ) then
if level == 2 and UIDROPDOWNMENU_MENU_VALUE == name then
info = UIDropDownMenu_CreateInfo()
info.text = skillName

if info.text == TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"] then
info.checked = true
else
info.checked = false
end
function info.func(button)
TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"] = skillName
UIDropDownMenu_SetText(LeftButtonDropDown, TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"])
--TauntMasterUnitFrames_Header.Spell1:SetTexture(select(3, GetSpellInfo(TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"])))
print(TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"] )
print(button)
end
UIDropDownMenu_AddButton(info, level)
end

end
--UIDropDownMenu_AddButton(info, name)
end

end

end

local numAccountMacros, numCharacterMacros = GetNumMacros()
if level == 1 then
info = UIDropDownMenu_CreateInfo()
info.text = ("Account Macros Submenu")
info.value = "Account Macros"
info.isTitle = true
info.hasArrow = true
UIDropDownMenu_AddButton(info, level)

info = UIDropDownMenu_CreateInfo()
info.text = ("CharacterMacros Submenu")
info.value = "CharacterMacros"
info.isTitle = true
info.hasArrow = true
UIDropDownMenu_AddButton(info, level)

end

for MacroInfo =1,numAccountMacros do
local name = select(1,GetMacroInfo(MacroInfo) )
if level == 2 and UIDROPDOWNMENU_MENU_VALUE == "Account Macros" then
info = UIDropDownMenu_CreateInfo()
info.text = name
info.isTitle = true
if info.text == TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"] then
info.checked = true
else
info.checked = false
end
function info.func(button)
TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"] = name
UIDropDownMenu_SetText(LeftButtonDropDown, TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"])
--TauntMasterUnitFrames_Header.Spell1:SetTexture(select(3, GetSpellInfo(TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"])))
print(TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"] )
print(button)
end
UIDropDownMenu_AddButton(info, level)
end
end


for i =1, numCharacterMacros do
local cname = select(1,GetMacroInfo(MAX_ACCOUNT_MACROS +i ) )
if level == 2 and UIDROPDOWNMENU_MENU_VALUE == "CharacterMacros" then
info = UIDropDownMenu_CreateInfo()
info.text = cname
info.isTitle = true
if info.text == TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"] then
info.checked = true
else
info.checked = false
end
function info.func(button)
TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"] = cname
UIDropDownMenu_SetText(LeftButtonDropDown, TauntMaster2.db.char.Spells[TauntMaster2.db.char.id]["LeftButton"])
end
UIDropDownMenu_AddButton(info, level)
end
end



end
"

all that getspell
Attached Files
File Type: lua TauntMasterGUI.lua (16.6 KB, 104 views)
File Type: lua TauntMasterConfig.lua (12.7 KB, 102 views)
File Type: lua TauntMaster2.lua (6.7 KB, 86 views)
  Reply With Quote
10-08-18, 10:08 PM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Okay, that error that occurs at least 22 times at that point could be stopping the rest of the addon to progress and thus breaking later functionality.

Have a look at this page that explains what the UnityPowerType function returns and how to handle a non existent powerType which is what the error is reporting. If you look at that line of code and those around it you should be able to make the necessary changes.

Hopefully once that happens it will work, but possibly it will trigger the next block of errors. Work through then as they appear. Google the command and see if there is an updated blizzard file containing its use and/or the wowpedia site to see if it is updated.

Unfortunately there are so many changes to do with Spells and Maps that remembering individual ones is hard to do, unless you come across them.
__________________
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » dropdown menu not working

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