Download
(30Kb)
Download
Updated: 01-30-24 07:08 AM
Compatibility:
Seeds of Renewal (10.2.5)
Classic (1.15.0)
WOTLK Patch (3.4.3)
Updated:01-30-24 07:08 AM
Created:05-24-17 12:08 PM
Downloads:3,368
Favorites:8
MD5:

LibUIDropDownMenu

Version: v4.25.10020553040
by: arith [More]

About

Standard UIDropDownMenu global functions using protected frames and causing taints when used by third-party addons. But it is possible to avoid taints by using same functionality with that library.

What is it

Library is standard code from Blizzard's files EasyMenu.lua, UIDropDownMenu.lua, UIDropDownMenu.xml, UIDropDownMenuTemplates.lua and UIDropDownMenuTemplates.xml with frames, tables, variables and functions added with "L_" as prefix.

  • Constant example : L_UIDROPDOWNMENU_MINBUTTONS
  • Function example : L_UIDropDownMenu_Initialize

How to use it (for addon developer)
  • Embed LibUIDropDownMenu to your addon, you can specify to the subfolder of LibUIDropDownMenu if you feel this keep the your addon's folder structure lighter.
  • Add LibUIDropDownMenu.xml to your toc or your embeds.xml / libs.xml.
  • Make sure your toc file has the following settings:
    Code:
    ## Dependencies: LibStub, LibUIDropDownMenu
  • If your addon doesn't embed LibStub, you will need it.
  • Like ordinal code for UIDropDownMenu with "L_" instead.

Constants
  • L_UIDROPDOWNMENU_MINBUTTONS
  • L_UIDROPDOWNMENU_MAXBUTTONS
  • L_UIDROPDOWNMENU_MAXLEVELS
  • L_UIDROPDOWNMENU_BUTTON_HEIGHT
  • L_UIDROPDOWNMENU_BORDER_HEIGHT
  • L_UIDROPDOWNMENU_OPEN_MENU
  • L_UIDROPDOWNMENU_INIT_MENU
  • L_UIDROPDOWNMENU_MENU_LEVEL
  • L_UIDROPDOWNMENU_MENU_VALUE
  • L_UIDROPDOWNMENU_SHOW_TIME
  • L_UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT
  • L_OPEN_DROPDOWNMENUS


Button Name
As you (the developers) might be aware that at some point you might need to manipulate the dropdowns by accessing the button names. For example, you have multiple levels of menus and you would like to hide or show some level's menu button. In that case, you need to make sure you also revise the button name used in your original codes when you are migrating to use LibUIDropDownMenu.
  • "L_DropDownList"..i

Functions
EasyMenu
  • L_EasyMenu
  • L_EasyMenu_Initialize

UIDropDown
  • L_UIDropDownMenuDelegate_OnAttributeChanged
  • L_UIDropDownMenu_InitializeHelper
  • L_UIDropDownMenu_Initialize
  • L_UIDropDownMenu_SetInitializeFunction
  • L_UIDropDownMenu_RefreshDropDownSize
  • L_UIDropDownMenu_OnUpdate
  • L_UIDropDownMenu_StartCounting
  • L_UIDropDownMenu_StopCounting
  • L_UIDropDownMenu_CreateInfo
  • L_UIDropDownMenu_CreateFrames
  • L_UIDropDownMenu_AddSeparator
  • L_UIDropDownMenu_AddButton
  • L_UIDropDownMenu_AddSeparator
  • L_UIDropDownMenu_GetMaxButtonWidth
  • L_UIDropDownMenu_GetButtonWidth
  • L_UIDropDownMenu_Refresh
  • L_UIDropDownMenu_RefreshAll
  • L_UIDropDownMenu_SetIconImage
  • L_UIDropDownMenu_SetSelectedName
  • L_UIDropDownMenu_SetSelectedValue
  • L_UIDropDownMenu_SetSelectedID
  • L_UIDropDownMenu_GetSelectedName
  • L_UIDropDownMenu_GetSelectedID
  • L_UIDropDownMenu_GetSelectedValue
  • L_UIDropDownMenuButton_OnClick
  • L_HideDropDownMenu
  • L_ToggleDropDownMenu
  • L_CloseDropDownMenus
  • L_UIDropDownMenu_OnHide
  • L_UIDropDownMenu_SetWidth
  • L_UIDropDownMenu_SetButtonWidth
  • L_UIDropDownMenu_SetText
  • L_UIDropDownMenu_GetText
  • L_UIDropDownMenu_ClearAll
  • L_UIDropDownMenu_JustifyText
  • L_UIDropDownMenu_SetAnchor
  • L_UIDropDownMenu_GetCurrentDropDown
  • L_UIDropDownMenuButton_GetChecked
  • L_UIDropDownMenuButton_GetName
  • L_UIDropDownMenuButton_OpenColorPicker
  • L_UIDropDownMenu_DisableButton
  • L_UIDropDownMenu_EnableButton
  • L_UIDropDownMenu_SetButtonText
  • L_UIDropDownMenu_SetButtonNotClickable
  • L_UIDropDownMenu_SetButtonClickable
  • L_UIDropDownMenu_DisableDropDown
  • L_UIDropDownMenu_EnableDropDown
  • L_UIDropDownMenu_IsEnabled
  • L_UIDropDownMenu_GetValue
  • L_UIDropDownMenu_CheckAddCustomFrame (introduced in 8.0.1.26433)
  • L_UIDropDownMenu_RegisterCustomFrame (introduced in 8.0.1.26433)

List of button attributes
  • info.text = [STRING] -- The text of the button
  • info.value = [ANYTHING] -- The value that L_UIDROPDOWNMENU_MENU_VALUE is set to when the button is clicked
  • info.func = [function()] -- The function that is called when you click the button
  • info.checked = [nil, true, function] -- Check the button if true or function returns true
  • info.isNotRadio = [nil, true] -- Check the button uses radial image if false check box image if true
  • info.isTitle = [nil, true] -- If it's a title the button is disabled and the font color is set to yellow
  • info.disabled = [nil, true] -- Disable the button and show an invisible button that still traps the mouseover event so menu doesn't time out
  • info.tooltipWhileDisabled = [nil, 1] -- Show the tooltip, even when the button is disabled.
  • info.hasArrow = [nil, true] -- Show the expand arrow for multilevel menus
  • info.hasColorSwatch = [nil, true] -- Show color swatch or not, for color selection
  • info.r = [1 - 255] -- Red color value of the color swatch
  • info.g = [1 - 255] -- Green color value of the color swatch
  • info.b = [1 - 255] -- Blue color value of the color swatch
  • info.colorCode = [STRING] -- "|cAARRGGBB" embedded hex value of the button text color. Only used when button is enabled
  • info.swatchFunc = [function()] -- Function called by the color picker on color change
  • info.hasOpacity = [nil, 1] -- Show the opacity slider on the colorpicker frame
  • info.opacity = [0.0 - 1.0] -- Percentatge of the opacity, 1.0 is fully shown, 0 is transparent
  • info.opacityFunc = [function()] -- Function called by the opacity slider when you change its value
  • info.cancelFunc = [function(previousValues)] -- Function called by the colorpicker when you click the cancel button (it takes the previous values as its argument)
  • info.notClickable = [nil, 1] -- Disable the button and color the font white
  • info.notCheckable = [nil, 1] -- Shrink the size of the buttons and don't display a check box
  • info.owner = [Frame] -- Dropdown frame that "owns" the current dropdownlist
  • info.keepShownOnClick = [nil, 1] -- Don't hide the dropdownlist after a button is clicked
  • info.tooltipTitle = [nil, STRING] -- Title of the tooltip shown on mouseover
  • info.tooltipText = [nil, STRING] -- Text of the tooltip shown on mouseover
  • info.tooltipOnButton = [nil, 1] -- Show the tooltip attached to the button instead of as a Newbie tooltip.
  • info.justifyH = [nil, "CENTER"] -- Justify button text
  • info.arg1 = [ANYTHING] -- This is the first argument used by info.func
  • info.arg2 = [ANYTHING] -- This is the second argument used by info.func
  • info.fontObject = [FONT] -- font object replacement for Normal and Highlight
  • info.menuTable = [TABLE] -- This contains an array of info tables to be displayed as a child menu
  • info.noClickSound = [nil, 1] -- Set to 1 to suppress the sound when clicking the button. The sound only plays if .func is set.
  • info.padding = [nil, NUMBER] -- Number of pixels to pad the text on the right side
  • info.leftPadding = [nil, NUMBER] -- Number of pixels to pad the button on the left side
  • info.minWidth = [nil, NUMBER] -- Minimum width for this line
  • info.customFrame = frame -- Allows this button to be a completely custom frame, should inherit from L_UIDropDownCustomMenuEntryTemplate and override appropriate methods.

FAQ

Please go to FAQ Pages for more details.

Revision History:
=================

v4.25.10020553040 (2024/01/30)
------------------------------
- Enhanced frame or texture's creation to set the name as nil when parent frame name is also nil
- Further error handling for NewFeature

v4.24.10020553007 (2024/01/23)
------------------------------
- Fixed issue of version confliction when older version was loaded first and then newer version was to replace the library.
What has been created won't have the "NewFeature" frame there.

v4.23.10020553007 (2024/01/22)
------------------------------
- Fixed issue with the compatibility with WoW 3.4.3 / 1.15.0

v4.22.10020553007 (2024/01/21)
------------------------------
- Toc update to support WoW 10.2.5 / 3.4.3 / 1.1.5
- function sync with build 53007

v4.21.10010550587 (2023/07/29)
------------------------------
- Toc update to support WoW 10.1.5 / 3.4.2
- function sync with build 50587

v4.20.10000748520 (2023/03/20)
------------------------------
- Toc update to support WoW 10.0.7

v4.19.10000047936 (2023/02/05)
------------------------------
- Toc update to support WoW 10.0.5 / 3.4.1

v4.18.10000046801 (2022/11/29)
------------------------------
- Replace SetBackdrop with backdropInfo

v4.17.10000046801 (2022/11/29)
------------------------------
- update backdrop template to DialogBorderDarkTemplate
- update BACKDROP_DIALOG_DARK.insets.bottom to 11
- update menubackdrop template to TooltipBackdropTemplate

v4.16.10000046689 (2022/11/18)
------------------------------
- Fixing tagging error

v4.15.10000046689 (2022/11/18)
------------------------------
- Toc update to support WoW 10.0.2
- Updated lib:UIDropDownMenu_JustifyText()

v4.14.10000046455 (2022/11/04)
------------------------------
- minor bug fix for menu icon onclick

v4.13.10000046366 (2022/11/03)
-----------------------------
- Toc update to support WoW 10.0.0
- function sync with build 46366

v4.12.9020745161 (2022/08/23)
-----------------------------
- Classic ToC update to support WoW 1.14.3
- Release for WOLTKC

v4.11.9020745114 (2022/07/17)
-----------------------------
- Toc update to support WoW 9.2.7
- Added support for Wrath of the Lich King Classic (WoW 3.4.0)

v4.10.9020542423 (2022/07/17)
-----------------------------
- Toc update to support WoW 9.2.5
- function sync with build 44232
- Fixed: Global Mouse Down making menu not toggle properly from the button (TeeloJubeithos)

v4.09.9020042698 (2022/03/23)
-----------------------------
- BCC ToC update to support WoW 2.5.4

v4.09.9020042488 (2022/02/28)
-----------------------------
- Fixed issue while in Classic or BCC in counting maximum buttons

v4.08.9020042423 (2022/02/23)
-----------------------------
- Toc update to support WoW 9.2.0
- function sync with build 42423

v4.07.9020042277 (2022/02/13)
-----------------------------
- function sync with build 42277
- enhanced the auto hide feature in ClassicEra and Classic TBC

v4.07.9020042257 (2022/02/10)
-----------------------------
- function sync with build 42257
- BCC ToC update to support WoW 2.5.3
- Classic ToC update to support WoW 1.14.2

v4.07.9020042174 (2022/02/09)
-----------------------------
- Support multiple ToC
- BCC ToC update to support WoW 2.5.3
- Classic ToC update to support WoW 1.14.1

v4.07.9020042069 (2022/01/26)
-----------------------------
- Toc update to support WoW 9.1.5
- function sync with build 42069
- fixed the issue that backdrop was not properly set

v4.06.9010039185 (2021/06/30)
-----------------------------
- Toc update to support WoW 9.1.0
- function sync with build 39185

v4.05.9000538556 (2021/06/14)
-----------------------------
- Rework on dropdown menu's audo-hide

v4.04.9000538556 (2021/06/14)
-----------------------------
- Allowing dropdown frame to be wihout a name (nil) given (for an anonymous frame)
- Added timeout for classic (both classic era and TBC) so that dropdown menu will auto-hide when mouse is away (thanks to DahkCeles)

v4.03.9000538556 (2021/05/19)
-----------------------------
- Added codes for fixing Tainting UIMenus and CloseMenus() (thanks to DahkCeles)

v4.02.9000538556 (2021/05/19)
-----------------------------
- Supported WoW Classic 2.5.1 (38707)

v4.01.9000236639 (2020/12/14)
-----------------------------
- Fixed issues that classic server doesn't have UIDropDownMenu_HandleGlobalMouseEvent()

v4.00.9000236639 (2020/11/22)
-----------------------------
- Toc update to suppport WoW 9.0.2
- LibUIDropDownMenu
- Set major version to 4.0
- Migrate all global functions to be under library tables
- Insert "L_DropDownList1" and "L_DropDownList2" to global UIMenus
- UIDropDownMenu_HandleGlobalMouseEvent (thanks to SLOKnightFall)
- LibEasyMenu
- Move function calls to under LibUIDropDownMenu and under library tables
- LibUIDropDownMenuTemplates
- Move codes to under LibUIDropDownMenu so that thet can de under one single library

v3.02.9000136272.01 (2020/10/20)
-----------------------------
- Fixed version detection while setting ColorSwatch's backdrop template. It should now be correctly detecting the retail (as well as ShadowLands) version

v3.02.9000136272 (2020/10/18)
-----------------------------
- Update to sync with 9.0.1 build 36272
- ToC update to support WoW 9.0.1

v3.01.9000135522 (2020/09/07)
-----------------------------
- Updated Backdrop's handling

v3.00.9000135522 (2020/08/19)
-----------------------------
- Shadowlands support and backward compatibility for both WoW classic and BFA

v2.01.8020031429 (2019/08/12)
-----------------------------
- Update to sync with 8.2.0 build 31429
- ToC update

v2.00.8010028833 (2018/12/27)
-----------------------------
- Migrate template to Lua function call
(Refer to below page for more details:
https://www.wowace.com/projects/libuidropdownmenu/pages/faq/changes-regarding-to-dropdown-templates-usage )
- Update major version to "LibUIDropDownMenu-2.0"

v1.08.8010028768 (2018/12/17)
-----------------------------
- Update to sync with 8.0.1 build 28768
- ToC update

v1.08.8000127326 (2018/08/11)
-----------------------------
- Workaround to get rid of addons which are still using old version of this library
(thanks to ddcorkum)

v1.08.8000127165 (2018/07/25)
-----------------------------
- Sync with WoW 8.0.1.27165
- Added L_UIDropDownMenu_SetDisplayMode()
- Added L_UIDropDownMenuButtonInvisibleButton_OnEnter()
- Added L_UIDropDownMenuButtonInvisibleButton_OnLeave()
- Added L_UIDropDownMenuButton_OnEnter()
- Added L_UIDropDownMenuButton_OnLeave()

v1.08.8000126433 (2018/04/24)
-----------------------------
- Sync with WoW 8.0.1.26433
- Added LibUIDropDownMenuTemplates.lua
- Added frame template: L_UIDropDownCustomMenuEntryTemplate
- Added local function GetChild()
- New custom frame functions:
- L_UIDropDownMenu_CheckAddCustomFrame()
- L_UIDropDownMenu_RegisterCustomFrame()
- New button attribute: info.customFrame
- Changes of L_UIDropDownMenu_AddSeparator() is to be reflected only on WoW 8.x.x
- L_UIDropDownMenu_AddSeparator(info, level) == > L_UIDropDownMenu_AddSeparator(level)
No need to specify info there to prevent from messing up other menu items if info is to be re-used.
- Fixed the lib's major version.
Previously with the wrong major version which also has the release version, it makes all the different versions of lib to be presented
as different entities, which means newer version won't replace the older version. The latest loaded one will replace all the constants
and functions.
This change will take effect until all the addons which embed this lib to replace with latest version.

v1.07.7030525961 (2018/04/23)
-----------------------------
- Remove external
- Refine upvalue and local function pre-definition
- Rename local parameters to make them consistent with others

v1.07.7030024931 (2017/08/31)
-----------------------------
- Remove PlaySound compact code.

v1.06.7030024931 (2017/08/31)
-----------------------------
- Remove PlaySound compact code.

v1.05.7030024920 (2017/08/29)
-----------------------------
- ToC update to support WoW 7.3.0

v1.04.7030024484 (2017/07/02)
-----------------------------
- Changed soundkit's ID to key indicator likes SOUNDKIT.U_CHAT_SCROLL_BUTTON

v1.03.7030024484 (2017/06/30)
-----------------------------
- Update version number

v1.02.7030024484 (2017/06/30)
-----------------------------
- Updated PlaySound API's usage method to support both 7.2.5 and 7.3.0 of WoW clients

v1.01.7020024015 (2017/05/25)
----------------------------
- Fixed the wrong name of LibEasyMenu.lua specified in LibUIDropDownMenu.xml

v1.00.7020024015 (2017/05/24)
----------------------------
- Clone from NoTaint_UIDropDownMenu v7.2.0.24015-r2
- Changed LIB_ and Lib_ to L_ to prevent from conflict with outdated
NoTaint_UIDropDownMenu being loaded from other addons
Optional Files (0)


Archived Files (17)
File Name
Version
Size
Author
Date
v4.24.10020553007
29kB
arith
01-23-24 10:59 AM
v4.23.10020553007
29kB
arith
01-22-24 07:29 AM
v4.22.10020553007
29kB
arith
01-21-24 06:30 AM
v4.21.10010550587
29kB
arith
07-29-23 06:11 AM
v4.20.10000748520
29kB
arith
03-28-23 07:05 AM
v4.19.10000047936
29kB
arith
02-05-23 05:54 AM
v4.18.10000046801
29kB
arith
11-29-22 10:45 AM
v4.16.10000046689
29kB
arith
11-17-22 11:36 AM
v4.14.10000046455
28kB
arith
11-06-22 06:49 AM
v4.12.9020745161
27kB
arith
08-22-22 10:35 AM
v4.11.9020745114
27kB
arith
08-17-22 08:36 AM
v4.10.9020542423
27kB
arith
07-17-22 01:40 AM
v4.09.9020042698
27kB
arith
03-24-22 08:29 AM
v4.09.9020042488
26kB
arith
02-27-22 10:18 AM
v4.08.9020042423
26kB
arith
02-23-22 10:02 AM
v4.07.9020042174
26kB
arith
02-09-22 09:55 AM
v4.05.9000538556
29kB
arith
06-28-21 06:33 AM


Post A Reply Comment Options
Unread 08-15-20, 09:20 PM  
arith
A Cyclonian
 
arith's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 75
Uploads: 35
Shadowlands

For addon developer, please help to test the branch codes here:

https://repos.wowace.com/wow/libuidr...branches/v3.00
Report comment to moderator  
Reply With Quote
Unread 12-26-18, 11:43 AM  
arith
A Cyclonian
 
arith's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 75
Uploads: 35
Deferred XML Node object

As since WoW 8.0.x, a XML template which has been declared before will get an error message like below when this template get declared again:

Deferred XML Node object named L_UIDropDownMenuButtonTemplate already exists

We have to migrate those templates to Lua. And therefore, for addon which is using LibUIDropDownMenu, and if you create your own DropDown menu in either XML or Lua by inhering to L_UIDropDownMenuTemplate, then you will need to revise your code by calling the new functional called "L_Create_UIDropDownMenu".



Old XML example:

Code:
<Button name="$parentDropDownMenu" inherits="L_UIDropDownMenuTemplate" hidden="true">
....
</Button >
Old Lua example:

Lua Code:
  1. local f = CreateFrame("Button", addon.name.."DropDownMenu", parent, "UIDropDownMenuTemplate")
  2. .....

And now you will need to create your DropDown menu in Lua, the codes will look like below:

local f = L_Create_UIDropDownMenu("myOwnDropDownMenu", parent)

The function usage is: L_Create_UIDropDownMenu(name_of_this_dropdown, UI_parent)
Report comment to moderator  
Reply With Quote
Unread 04-23-18, 10:50 PM  
arith
A Cyclonian
 
arith's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 75
Uploads: 35
Supports in WoW 8.0.1

With the r29 in the SVN repo, I have synched with WoW 8.0.1.26433 and make it to support both 7.3.x and 8.0.x.
Though I don't have access to WoW 8.0.x alpha/beta at the moment so I am not able to do any test.
If anyone who has access can help to test it, please let me know you you find anything wrong.

For addon developer who is about to start the implementation for WoW 8.0.x, please also read this thread:
UIDropDownMenu_AddSeparator syntax changed in 8.0.1
Report comment to moderator  
Reply With Quote
Unread 07-28-17, 11:56 PM  
arith
A Cyclonian
 
arith's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 75
Uploads: 35
Originally Posted by coani
Thanks for the quick look, Poss works for me now, and this made me realize I forgot to check for those Show/Hide/Toggle calls in another addon I had tried to change, didn't realize I broke a button in the ui on it which I never used myself
Guess I'll take a better look now at other addons that use Bliz's UIDropDownMenu and have caused problems, especially in combat, and see if I can get them to behave better.

Thanks for your help & work!

Good to know it works, and good luck.
Report comment to moderator  
Reply With Quote
Unread 07-28-17, 04:47 AM  
coani
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 40
Uploads: 3
Thanks for the quick look, Poss works for me now, and this made me realize I forgot to check for those Show/Hide/Toggle calls in another addon I had tried to change, didn't realize I broke a button in the ui on it which I never used myself
Guess I'll take a better look now at other addons that use Bliz's UIDropDownMenu and have caused problems, especially in combat, and see if I can get them to behave better.

Thanks for your help & work!


Originally Posted by arith
Originally Posted by arith
Originally Posted by coani
I have a problem. With my extremely limited knowledge in mucking about with lua, I had converted a few addons that used uidropdownmenu to using the older lib_uidropdownmenu, and those worked fine.
With the L_ lib version here, I updated them (locally) to make use of it, which worked fine *except* for one: Possessions ( http://www.wowinterface.com/download...atefor7.2.html ). I had posted some time ago my lib_ version under other files there (so you can look if you want), but when I tried to update Poss to use the L_ lib version instead, I got this lua error, and I'm stumped how to fix it:

...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:1102: attempt to index local 'filterText' (a nil value)
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:1102: in function `L_UIDropDownMenu_SetText'
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:685: in function `L_UIDropDownMenu_Refresh'
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:746: in function `L_UIDropDownMenu_SetSelectedID'
Possessions\Possessions-r14.lua:761: in function `Possessions_ClearDropDowns'
Possessions\Possessions-r14.lua:610: in function `Possessions_Show'
Possessions\Possessions-r14.lua:620: in function `Possessions_Toggle'
Possessions\Possessions-r14.lua:627: in function `Possessions_SlashCommandHandler'
Possessions\Possessions-r14.lua:1349: in function `?'
FrameXML\ChatFrame.lua:4486: in function `ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4154: in function `ChatEdit_SendText'
FrameXML\ChatFrame.lua:4190: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>

I had also tried to do same update to the newer r14 version of Poss, getting same error there.
I did a quick fix and it looks to be working fine. You can find the revised files here.

Let me know if any problem.
One note on my changes:
  • DropDownList1: This need to be changed to L_DropDownList1. I will update the document to reflect it.
Report comment to moderator  
Reply With Quote
Unread 07-27-17, 09:08 PM  
arith
A Cyclonian
 
arith's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 75
Uploads: 35
Originally Posted by arith
Originally Posted by coani
I have a problem. With my extremely limited knowledge in mucking about with lua, I had converted a few addons that used uidropdownmenu to using the older lib_uidropdownmenu, and those worked fine.
With the L_ lib version here, I updated them (locally) to make use of it, which worked fine *except* for one: Possessions ( http://www.wowinterface.com/download...atefor7.2.html ). I had posted some time ago my lib_ version under other files there (so you can look if you want), but when I tried to update Poss to use the L_ lib version instead, I got this lua error, and I'm stumped how to fix it:

...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:1102: attempt to index local 'filterText' (a nil value)
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:1102: in function `L_UIDropDownMenu_SetText'
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:685: in function `L_UIDropDownMenu_Refresh'
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:746: in function `L_UIDropDownMenu_SetSelectedID'
Possessions\Possessions-r14.lua:761: in function `Possessions_ClearDropDowns'
Possessions\Possessions-r14.lua:610: in function `Possessions_Show'
Possessions\Possessions-r14.lua:620: in function `Possessions_Toggle'
Possessions\Possessions-r14.lua:627: in function `Possessions_SlashCommandHandler'
Possessions\Possessions-r14.lua:1349: in function `?'
FrameXML\ChatFrame.lua:4486: in function `ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4154: in function `ChatEdit_SendText'
FrameXML\ChatFrame.lua:4190: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>

I had also tried to do same update to the newer r14 version of Poss, getting same error there.
I did a quick fix and it looks to be working fine. You can find the revised files here.

Let me know if any problem.
One note on my changes:
  • DropDownList1: This need to be changed to L_DropDownList1. I will update the document to reflect it.
Report comment to moderator  
Reply With Quote
Unread 07-27-17, 10:11 AM  
arith
A Cyclonian
 
arith's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 75
Uploads: 35
Originally Posted by coani
I have a problem. With my extremely limited knowledge in mucking about with lua, I had converted a few addons that used uidropdownmenu to using the older lib_uidropdownmenu, and those worked fine.
With the L_ lib version here, I updated them (locally) to make use of it, which worked fine *except* for one: Possessions ( http://www.wowinterface.com/download...atefor7.2.html ). I had posted some time ago my lib_ version under other files there (so you can look if you want), but when I tried to update Poss to use the L_ lib version instead, I got this lua error, and I'm stumped how to fix it:

...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:1102: attempt to index local 'filterText' (a nil value)
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:1102: in function `L_UIDropDownMenu_SetText'
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:685: in function `L_UIDropDownMenu_Refresh'
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:746: in function `L_UIDropDownMenu_SetSelectedID'
Possessions\Possessions-r14.lua:761: in function `Possessions_ClearDropDowns'
Possessions\Possessions-r14.lua:610: in function `Possessions_Show'
Possessions\Possessions-r14.lua:620: in function `Possessions_Toggle'
Possessions\Possessions-r14.lua:627: in function `Possessions_SlashCommandHandler'
Possessions\Possessions-r14.lua:1349: in function `?'
FrameXML\ChatFrame.lua:4486: in function `ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4154: in function `ChatEdit_SendText'
FrameXML\ChatFrame.lua:4190: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>

I had also tried to do same update to the newer r14 version of Poss, getting same error there.
I did a quick fix and it looks to be working fine. You can find the revised files here.

Let me know if any problem.
Last edited by arith : 07-27-17 at 08:54 PM.
Report comment to moderator  
Reply With Quote
Unread 07-27-17, 09:43 AM  
arith
A Cyclonian
 
arith's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 75
Uploads: 35
Originally Posted by coani
I have a problem. With my extremely limited knowledge in mucking about with lua, I had converted a few addons that used uidropdownmenu to using the older lib_uidropdownmenu, and those worked fine.
With the L_ lib version here, I updated them (locally) to make use of it, which worked fine *except* for one: Possessions ( http://www.wowinterface.com/download...atefor7.2.html ). I had posted some time ago my lib_ version under other files there (so you can look if you want), but when I tried to update Poss to use the L_ lib version instead, I got this lua error, and I'm stumped how to fix it:

...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:1102: attempt to index local 'filterText' (a nil value)
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:1102: in function `L_UIDropDownMenu_SetText'
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:685: in function `L_UIDropDownMenu_Refresh'
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:746: in function `L_UIDropDownMenu_SetSelectedID'
Possessions\Possessions-r14.lua:761: in function `Possessions_ClearDropDowns'
Possessions\Possessions-r14.lua:610: in function `Possessions_Show'
Possessions\Possessions-r14.lua:620: in function `Possessions_Toggle'
Possessions\Possessions-r14.lua:627: in function `Possessions_SlashCommandHandler'
Possessions\Possessions-r14.lua:1349: in function `?'
FrameXML\ChatFrame.lua:4486: in function `ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4154: in function `ChatEdit_SendText'
FrameXML\ChatFrame.lua:4190: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>


I had also tried to do same update to the newer r14 version of Poss, getting same error there.
Just downloaded the r14, it's now using the WoW's built-in UIDropDownMenu functions.
Report comment to moderator  
Reply With Quote
Unread 07-27-17, 05:23 AM  
coani
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 40
Uploads: 3
I have a problem. With my extremely limited knowledge in mucking about with lua, I had converted a few addons that used uidropdownmenu to using the older lib_uidropdownmenu, and those worked fine.
With the L_ lib version here, I updated them (locally) to make use of it, which worked fine *except* for one: Possessions ( http://www.wowinterface.com/download...atefor7.2.html ). I had posted some time ago my lib_ version under other files there (so you can look if you want), but when I tried to update Poss to use the L_ lib version instead, I got this lua error, and I'm stumped how to fix it:

...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:1102: attempt to index local 'filterText' (a nil value)
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:1102: in function `L_UIDropDownMenu_SetText'
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:685: in function `L_UIDropDownMenu_Refresh'
...DropDownMenu\LibUIDropDownMenu\LibUIDropDownMenu.lua:746: in function `L_UIDropDownMenu_SetSelectedID'
Possessions\Possessions-r14.lua:761: in function `Possessions_ClearDropDowns'
Possessions\Possessions-r14.lua:610: in function `Possessions_Show'
Possessions\Possessions-r14.lua:620: in function `Possessions_Toggle'
Possessions\Possessions-r14.lua:627: in function `Possessions_SlashCommandHandler'
Possessions\Possessions-r14.lua:1349: in function `?'
FrameXML\ChatFrame.lua:4486: in function `ChatEdit_ParseText'
FrameXML\ChatFrame.lua:4154: in function `ChatEdit_SendText'
FrameXML\ChatFrame.lua:4190: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>


I had also tried to do same update to the newer r14 version of Poss, getting same error there.
Report comment to moderator  
Reply With Quote
Unread 06-01-17, 12:56 AM  
arith
A Cyclonian
 
arith's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 75
Uploads: 35
Re: Titan Panel Inclusion

Originally Posted by HonorGoG
Titan Panel will be using this library moving forward. I'm getting hammered by complaints about incompatible library references within NoTaint and there is little I can do except something radical like this. I just need to make it easy for the plugin authors that will need to migrate so I will be including your readme file over on the titanpanel.org portal.
That's what I have been experiencing, and that's why I finally decided to create a new lib with new prefix, hoping this makes things easily.

Let me know if anything I can help.
Report comment to moderator  
Reply With Quote
Unread 05-31-17, 10:21 PM  
HonorGoG
An Aku'mai Servant
 
HonorGoG's Avatar
AddOn Author - Click to view AddOns

Forum posts: 33
File comments: 102
Uploads: 6
Titan Panel Inclusion

Titan Panel will be using this library moving forward. I'm getting hammered by complaints about incompatible library references within NoTaint and there is little I can do except something radical like this. I just need to make it easy for the plugin authors that will need to migrate so I will be including your readme file over on the titanpanel.org portal.
Report comment to moderator  
Reply With Quote
Unread 05-24-17, 10:27 PM  
arith
A Cyclonian
 
arith's Avatar
AddOn Author - Click to view AddOns

Forum posts: 45
File comments: 75
Uploads: 35
Originally Posted by yj368413
Is there a mistake in LibUIDropDownMenu.xml line 6 ?

<Script file="LibEasyMenu"/> → <Script file="LibEasyMenu.lua"/>
Oops, you are right. I will fix it right away.
Report comment to moderator  
Reply With Quote
Unread 05-24-17, 09:29 PM  
yj368413
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 69
Uploads: 8
Is there a mistake in LibUIDropDownMenu.xml line 6 ?

<Script file="LibEasyMenu"/> → <Script file="LibEasyMenu.lua"/>
__________________
www.maorui.org
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: