View Single Post
05-11-17, 03:51 AM   #5
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by arith View Post
I spent a few time reading to the issue posted in your addon project, and did some test with MoveEverything and some of my addons which also use NoTaint_UIDropDown (such as Accountant Classic, or World Map Tracking Enhanced), I found something weird.
If I disable all addons, but only enable WardrobeSort and Accountant Classic (which we use exactly the same version of NoTaint_UIDropDown), and when I visit the transmogrifer and the UI pop-up, clicking on the Sort By menu, I can see the menu items from Accountant Classic is also showing there.

That sounds weird... I tried to test this but I couldn't reproduce it yet

https://gfycat.com/AbsoluteAdeptCurassow

-----

About the issue, I was badly grabbing the text from the dropdown,
I tried to index the Text field but it apparently doesn't exist when MoveAnything's version is also loaded
Lua Code:
  1. local dropdown = CreateFrame("Frame", "TestDropDown", UIParent, "Lib_UIDropDownMenuTemplate")
  2. Lib_UIDropDownMenu_SetText(dropdown, "Hello World")
  3. print(Lib_UIDropDownMenu_GetText(dropdown))
  4. print(dropdown.Text:GetText())
Code:
Message: ..\AddOns\WardrobeSort\WardrobeSort.lua line 4:
   attempt to index field 'Text' (a nil value)

Last edited by Ketho : 05-11-17 at 04:36 AM. Reason: forgot about Lib_UIDropDownMenu_GetText
  Reply With Quote