ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Alpha/Beta AddOns (https://www.esoui.com/forums/forumdisplay.php?f=171)
-   -   LibAddonMenu-2.0 r31 beta (https://www.esoui.com/forums/showthread.php?t=9226)

sirinsidiator 06/19/20 02:15 PM

LibAddonMenu-2.0 r31 beta
 
1 Attachment(s)
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

marlonbrando 06/19/20 03:28 PM

Quote:

Originally Posted by sirinsidiator (Post 41574)
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!

Scootworks 06/20/20 02:51 AM

so far no issues. also tested #112 and #111 specifically

sirinsidiator 06/20/20 12:15 PM

Thanks both of you. If nobody else experiences any problems, I plan to release it tomorrow.

Gandalf 06/21/20 04:06 AM

Had a look at #115, works flawless now.
Was not aware that one can assign a namespace to SetHandler :o
Really like this solution.

Cheers,
Gandalf

sirinsidiator 06/21/20 04:41 AM

Quote:

Originally Posted by Gandalf (Post 41586)
Had a look at #115, works flawless now.
Was not aware that one can assign a namespace to SetHandler :o
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. :D

sirinsidiator 06/21/20 03:08 PM

The new version is now live. Thanks everyone who tested it.

NaterOfTheWired 06/21/20 10:05 PM

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.

Baertram 06/22/20 03:32 AM

Quote:

Originally Posted by NaterOfTheWired (Post 41593)
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


All times are GMT -6. The time now is 06:18 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2014 - 2020 MMOUI