Quantcast
LibAddonMenu-2.0 r31 beta - ESOUI
 
Thread Tools Display Modes
06/19/20, 02:15 PM   #1
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,427
LibAddonMenu-2.0 r31 beta

This release removes the embedded LibStub which may cause an error in case an addon relied on LAM as a source for LibStub and LibStub isn't installed separately by the user. So I decided to post it here first in order to give authors and users a chance to do some testing before I upload it for everyone.

Changes:
- fixed iconpicker showing an empty tooltip when no choicesTooltips are set (#111, thanks Scootworks)
- fixed slider mouse wheel interactions (#115)
- fixed translated texts not showing in the official Russian localization (#118, thanks andy.s)
- improved dropdown choice tooltip code compatibility (#115)
- added "helpUrl" property for many control types (#109, thanks Baertram)
- added "textType" and "maxChars" properties for editbox (#110, thanks Scootworks)
- added "readOnly" property for slider (#112, thanks Scootworks)
- removed embedded copy of LibStub (#116)
- updated Japanese translation (#113, thanks Calamath)
- updated for Greymoor
Attached Files
File Type: zip LibAddonMenu-2.0r31.zip (48.9 KB, 57 views)
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
  Reply With Quote
06/19/20, 03:28 PM   #2
marlonbrando
AddOn Author - Click to view addons
Join Date: Dec 2015
Posts: 13
Originally Posted by sirinsidiator View Post
This release removes the embedded LibStub which may cause an error in case an addon relied on LAM as a source for LibStub and LibStub isn't installed separately by the user. So I decided to post it here first in order to give authors and users a chance to do some testing before I upload it for everyone.

Changes:
- fixed iconpicker showing an empty tooltip when no choicesTooltips are set (#111, thanks Scootworks)
- fixed slider mouse wheel interactions (#115)
- fixed translated texts not showing in the official Russian localization (#118, thanks andy.s)
- improved dropdown choice tooltip code compatibility (#115)
- added "helpUrl" property for many control types (#109, thanks Baertram)
- added "textType" and "maxChars" properties for editbox (#110, thanks Scootworks)
- added "readOnly" property for slider (#112, thanks Scootworks)
- removed embedded copy of LibStub (#116)
- updated Japanese translation (#113, thanks Calamath)
- updated for Greymoor
I tested this exhaustively by opening the Settings->Addons tab and clicking on a few things. Everything seemed to work fine!
  Reply With Quote
06/20/20, 02:51 AM   #3
Scootworks
 
Scootworks's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2014
Posts: 290
so far no issues. also tested #112 and #111 specifically
__________________
EU Server - SŁĄuGhTerHĜuSe
  Reply With Quote
06/20/20, 12:15 PM   #4
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,427
Thanks both of you. If nobody else experiences any problems, I plan to release it tomorrow.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
  Reply With Quote
06/21/20, 04:06 AM   #5
Gandalf
 
Gandalf's Avatar
Join Date: Aug 2016
Posts: 27
Had a look at #115, works flawless now.
Was not aware that one can assign a namespace to SetHandler
Really like this solution.

Cheers,
Gandalf
  Reply With Quote
06/21/20, 04:41 AM   #6
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,427
Originally Posted by Gandalf View Post
Had a look at #115, works flawless now.
Was not aware that one can assign a namespace to SetHandler
Really like this solution.

Cheers,
Gandalf
It's a relatively new feature. The cool part is that it allows you to register any number of handlers without the need to prehook and you can even specify if you need to execute yours before or after another one by name. Makes it really nice for addon compatibility.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
  Reply With Quote
06/21/20, 03:08 PM   #7
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,427
The new version is now live. Thanks everyone who tested it.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
  Reply With Quote
06/21/20, 10:05 PM   #8
NaterOfTheWired
Join Date: Jun 2020
Posts: 1
Technically this is not an issue with LibAddonMenu-2.0, but with the removal of the embedded LibStub which broke Wykkyd's Toolbar, DarkUI, PointsOfColor, and ConspicuousQuestMarkers. Nothing to do on this end I dont think. Those authors just need to update their addons to remove LibStub properly.
  Reply With Quote
06/22/20, 03:32 AM   #9
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 3,088
Originally Posted by NaterOfTheWired View Post
Technically this is not an issue with LibAddonMenu-2.0, but with the removal of the embedded LibStub which broke Wykkyd's Toolbar, DarkUI, PointsOfColor, and ConspicuousQuestMarkers. Nothing to do on this end I dont think. Those authors just need to update their addons to remove LibStub properly.
Afaik LAM2 will also still work with LibStub installed, if there are addons using embedded older versions e.g. (which should have been patched and fixed since years already).
But the removal of LibStub in total was communicated since Summerset patch, >2 years ago now.

These addons just need to:
1. switch from these kind of source lines:
Code:
local lam = LibStub("LibAddonMenu-2.0")
to this one:
Lua Code:
  1. local lam = LibAddonMenu2
2. Delete ALL included OLD library folders in subfolders, or inside the addon's folder, like "libs", "Libraries", etc. where these libraries were included without their own txt files!
If the librray does not exist with it's own txt file it can be kept inside there.
But if it's a real library, meant to be reused in several addons, it should be release WITH a txt file, or the code should be maybe not in a library but directly in the addon's lua files.
3. Inside the addon's txt files the hardcoded lines to the libraries, which were removed from the subfolders, need to be removed.
e.g.
Code:
/libs/LibAddonMenu-2.0/LibAddonMenu-2.0/controls/editbox.lua
/libs/LibAddonMenu-2.0/LibAddonMenu-2.0/LibAddonMenu-2.0.lua
4. In the txt file of the addon use the tags
## DependsOn: <libraryName1> <libraryName2>>=<libraryVersion>
or
## OptionalDependsOn: <libraryName1> <libraryName2>>=<libraryVersion>
to define if the addon will not load without the librray (and version) installed (## DependsOn)
or if the addon will load without the librray (and version) installed, but it optionally will load the libs first (if found!).

<libraryName1> = the name of the library's txt file or foldername
if >= is specified after the libraryname a "version check" will be done. Only libs with this, or a higher version, will be loaded!
<libraryVersion> = the integer number from the library's txt file's tag ## AddOnVersion: <integerNumber>

So e.g. use
Code:
## DependsOn: LibAddonMenu-2.0>=31
will tell your addon to load only if the LAM2.0 version r31 was installed and activated.
5. You may also download the complete library, including their txt file, and put them extracted to the subfolder "libs" of your addon. This will make the addon manager find the txt files in there and check if your version is the newest one to load. But including them without txt files or even ALWAYS load them hardcoded from your addon's txt file will most probably create errors and problems. So freain from using this way of library loading where NOT NEEDED (e.g. lib does not provide a txt file [yet]).


Additional info for lua addon developers, regarding included libraries:
https://www.esoui.com/forums/showthread.php?t=8765

Additonal library/dependency information can be found here:
https://wiki.esoui.com/Libraries
https://www.esoui.com/forums/showthread.php?t=9149

Last edited by Baertram : 06/22/20 at 07:16 AM.
  Reply With Quote

ESOUI » AddOns » Alpha/Beta AddOns » LibAddonMenu-2.0 r31 beta

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