ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Let's get rid of LibStub! (https://www.esoui.com/forums/showthread.php?t=8492)

sirinsidiator 04/28/19 02:18 PM

Let's get rid of LibStub!
 
I believe this can be done in 3 "easy" steps:

1) Update libraries to provide an alternative way of being accessed.
This step shouldn't introduce any major compatibility issues as we still keep everything as is and addons that have not been updated can use LibStub as a method to access the library as before. It's just to pave the way to phase out library access via LibStub in addons
All that should be necessary is to extend the code like this:
Lua Code:
  1. local MAJOR, MINOR = "LibSomething", 3
  2. local lib = LibStub:NewLibrary(MAJOR, MINOR)
  3. if not lib then
  4.     return
  5.     -- already loaded and no upgrade necessary
  6. end
  7.  
  8. LibSomething = lib -- new way to access it without LibStub


In the manifest we also add the "AddOnVersion" and "IsLibrary" directive:
Code:

## AddOnVersion: 3
## IsLibrary: true

That's not strictly necessary until after LibStub has been removed from the lib, but it will ensure that only the newest standalone version is loaded (embedded versions will behave as before) and also move it to the new library section in the addon menu once Elsweyr is released.

2) Find all addons that use a library and change them (or request it) to access dependent libraries via the newly introduced global variable instead of LibStub, remove its files from the addon manifest (so it is no longer embedded) and change from OptionalDependsOn to DependsOn.
Lua Code:
  1. local LS = LibStub("LibSomething")
should become
Lua Code:
  1. lobal LS = LibSomething


3) Update libraries to no longer use LibStub. This will likely cause compatibility issues with any addons that have not been updated in step 2, but at some point we just need to pull the trigger, otherwise LibStub won't ever disappear completely.

Lua Code:
  1. local lib = {}
  2. LibSomething = lib

Let me know what you think. Did I miss anything? Who's on board?
I will start with step 1 in LAMr28 and will introduce the new global variable "LibAddonMenu".

votan 04/28/19 03:23 PM

I will rewrite my libs to define a global variable. Some do already.

Drakanwulf 04/28/19 03:34 PM

@sirinsidiator, Excellent suggestion, sir. I think the sooner this is done, the more reliable our game environment will become and the better the Minion maintenance program will get at checking and verifying add-on packages before downloading them. I would be happy to help out in any way that I can be of assistance.

I have already done much of what you suggested as part of my pursuit of my "windmill" quest to load all my NA Live add-ons without having to turn the OOD checkbox ON. I have been successful by making the packaging and manifest files changes as you have suggested in this post.

Converting the add-ons to standalone and to current manifest settings was not difficult; mostly time consuming. The most difficult part was determining which of the add-ons needed their OOD library versions rather than the newer ESOUI versions because their add-on code that used the libraries had never been updated to use any of the updated library functions. I think these out-of-date, "private" libraries will prove to be an issue with add-ons that are no longer being maintained by anyone.

Drakanwulf 04/28/19 03:44 PM

Quote:

Originally Posted by votan (Post 37910)
I will rewrite my libs to define a global variable. Some do already.

Or you can take a look at the AddonStub standalone support add-on code and decide if its benefits are worth your adding its name to the DependsOn: directive in the manifest file (e.g. "## DependsOn: AddonStub").

Rhyono 04/28/19 03:47 PM

The level of difficulty to make the switch is negligible. Most addons that are still heavily used are currently being maintained. If an addon is abandoned but still functioning and heavily used, I'm sure a few of us could patch it for such a minimal change.

Kyoma 04/28/19 05:08 PM

BURN IT DOWN! BURN IT ALL DOWN!!! :banana:

Scootworks 04/29/19 01:27 AM

Quote:

Originally Posted by Kyoma (Post 37915)
BURN IT DOWN! BURN IT ALL DOWN!!! :banana:

BURN IT ALL DOWN! :-)

Baertram 04/29/19 04:44 PM

Sounds good and should be easily doable. Only will take time :D

About "AddonStub": I did not really get what4 it can/should be used but I think removing 1 versioning lib to use another (kind of) one shouldn't be the solution. I'll go for ##AddOnVersion: and ##IsLibrary + global lib variable.

Drakanwulf 04/30/19 12:29 AM

Quote:

Originally Posted by Baertram (Post 37938)
Sounds good and should be easily doable. Only will take time :D

About "AddonStub": I did not really get what4 it can/should be used but I think removing 1 versioning lib to use another (kind of) one shouldn't be the solution. I'll go for ##AddOnVersion: and ##IsLibrary + global lib variable.

AddonStub does not version anything. The game does that. What AddonStub does do is to check manifest content versus code content to insure that the AddOnVersion: directive and its number are both present and are both valid values. The rest of the code properly disposes of OOD duplicates and embedded duplicates or it creates a manifest table for all valid add-ons. And it updates existing add-ons whenever it detects a newer AddOnVersion: number.

Baertram 04/30/19 04:14 AM

Oh, okay. Understood it's purpose wrong then. Thanks for the clarification.

sirinsidiator 04/30/19 05:49 AM

I just took a look at this AddonStub and I'll be honest here. It is absolutely useless and pretty much the same as LibStub that we are trying to get rid of for that reason. Not sure why you would try to push this now?

Everything it is trying to do is handled by the game itself. There is no need to try avoiding loading duplicate addon names or check their addon version, since the game itself does exactly that. On the contrary, it is even slowing down the loading for no real reason, because it iterates over the whole addon list every time an addon is loaded, making it likely much slower than what the game itself does internally to handle multiple instances of the same addon in nested folders. :rolleyes:

Drakanwulf 04/30/19 03:25 PM

@sirinsidiator, your reasoning seems to be valid so I shall retire AddonStub from the ESOUI add-ons catalog provided someone who knows exactly how the game code works would volunteer to put a valid example into the ESOUI wiki that illustrates how to code a simple, consistent, start up logic with a trap in it to detect any mistakes and/or oversights in the game's add-on loading logic or execution.

Thanks again for taking the time to explain to me more of the things that I do not know about the game. It is appreciated.

Rhyono 04/30/19 04:29 PM

##AddOnVersion should automatically solve all duplication issues. If the internal handler finds a second one with the same or lower version, it will just ignore them. Nothing special should need done within addons relying on another addon (except a DependsOn).

Drakanwulf 04/30/19 08:05 PM

How is this for a standalone bootstrap example? Comments and critiques are expected and would be welcomed because I intend to update the MapTables support (i.e library) add-on calls to AddonStub with this snippet if I can get a consensus that this code will work and work efficiently.

Lua Code:
  1. --[[-------------------------------------------------------------------------------------------------------------------
  2. Bootstrap code to either start or fail this add-on.
  3. ---------------------------------------------------------------------------------------------------------------------]]
  4. local addon = MapTables
  5. assert( not addon, "MapTables: This add-on is already loaded. Do NOT load add-ons multiple times!" )
  6.  
  7. addon = {}
  8. MapTables = addon
  9. assert( MapTables, "MapTables: The game failed to create a global control entry!" )
  10. --[[-------------------------------------------------------------------------------------------------------------------
  11. ... And add-on initialization code continues on from here ...
  12. ---------------------------------------------------------------------------------------------------------------------]]

What do you all think?

votan 05/01/19 02:59 AM

I think Drakanwulf is afraid of addons including a lib the old way without making their addon optional depend on the stand-alone version.

Kyoma 05/01/19 03:07 AM

If your library never used LibStub then there's no need to worry about addons not properly using your library. Well, unless they decide to modify the library packaged with their addon. :p

sirinsidiator 05/01/19 05:34 AM

@Drakanwulf That looks pretty good. I use the following snippet for my own "new-style" libs:

Lua Code:
  1. local LIB_IDENTIFIER = "LibDebugLogger"
  2.  
  3. assert(not _G[LIB_IDENTIFIER], LIB_IDENTIFIER .. " is already loaded")
  4.  
  5. local lib = {}
  6. _G[LIB_IDENTIFIER] = lib

You can probably drop the second assert, since that should never ever be possible to happen, and if it does happen, you have other problems.

@Kyoma the assert is mostly in case other developers decide to start making a new addon with that name, so they get a warning right away. :D

merlight 05/01/19 06:10 AM

Quote:

Originally Posted by sirinsidiator (Post 37909)
I believe this can be done in 3 "easy" steps:

But why?

I fail to see any real benefit in dropping LibStub, other than getting rid of a bunch of copies of one tiny source file. LibStub sets up a common namespace for libraries. All you're going to achieve is spill that namespace into the global one. To quote a classic:

Namespaces are one honking great idea -- let's do more of those!


At the same time you're winding up to break unmaintained addons just for the sake of breaking them -- when libraries they use get an upgrade that will not register with LibStub anymore.

sirinsidiator 05/01/19 10:08 AM

Quote:

Originally Posted by merlight (Post 37969)
But why?

I fail to see any real benefit in dropping LibStub, other than getting rid of a bunch of copies of one tiny source file. LibStub sets up a common namespace for libraries. All you're going to achieve is spill that namespace into the global one. To quote a classic:

Namespaces are one honking great idea -- let's do more of those!


At the same time you're winding up to break unmaintained addons just for the sake of breaking them -- when libraries they use get an upgrade that will not register with LibStub anymore.

The main reason is to remove a troublesome piece of code that has caused countless problems for authors due to the way it handles library versioning. The game itself can now handle the versioning better than LibStub ever could. I'm also not worried about the few extra namespaces in an environment where we have almost 50k global variables. What even is the benefit of having all libraries in one namespace, or is it just for the sake of it?

Unmaintained addons will continue to load their own embedded LibStub and version of any libs as before, so I don't see how they would be affected by library updates that no longer use LibStub.

merlight 05/01/19 12:07 PM

Quote:

Originally Posted by sirinsidiator (Post 37978)
The main reason is to remove a troublesome piece of code that has caused countless problems for authors due to the way it handles library versioning. The game itself can now handle the versioning better than LibStub ever could. I'm also not worried about the few extra namespaces in an environment where we have almost 50k global variables. What even is the benefit of having all libraries in one namespace, or is it just for the sake of it?

Unmaintained addons will continue to load their own embedded LibStub and version of any libs as before, so I don't see how they would be affected by library updates that no longer use LibStub.

You're right. I sometimes forget that my way of installing addons without embedded libraries is not how everyone else does it.

Sordrak 05/11/19 07:22 AM

So is this now going to be a thing or not?

I'm currently trying to shift to the new style, but i don't think the support for this is that huge currently.

Or maybe I do not see how to use some of the libraries in this new way.

Anyone got some feedback regarding:
LibCustomMenu
LibGPS
LibMapPing
LibMapPins-1.0
LibPotionBuff

Any feedback would be appreciated. :)

Baertram 05/11/19 09:11 AM

LibPotionBuff will be changed, already got a beta version for tests here if you want to try it out:
LibPotionBuff without LibStub

And the others will follow, I'm pretty sure. So I will definately remove LibStub from my libraries. It takes some time but e.g. LibFilters needed a new version for this (3.0) and 2.0 should be replaced with 3.0 soon!
I guess you should start to modify your addons to support both ways.
Either the global variable or LibStub like this:

Lua Code:
  1. local lpb = LibPotionBuff
  2. if lpb == nil and LibStub then lpb = LibStub("LibPotionBuff") end

In your addon#s manifest ttx be sure to add LibPotionBuff to the ##DependsOn: entry:

Code:

##DependsOn: LibPotionBuff
And remove LiBStub from the DependsOn and OptionalDependsOn as this should be handled in the library's own txt file (if installed as stadnalone and NOT included in your addon zip file) on it's own via LibPotionBuff.txt -> ##DependsOn: LibStub or even not anymore for the new version.

If you have the libraries included into your addon's zip archive you should start to remove them, or be sure to support them properly so either users containing older versions of your addon WITH LibStub libraries are able to use it AND new versions without it as well (as shown above in the example).

Sordrak 05/11/19 10:44 AM

I guess i just ran into this here... LibAddonMenu present in an old version and me only supporting the new one.

No idea of how i should feel supporting both versions at the moment o_O

Thanks for the info btw. :)

Kyoma 05/11/19 12:00 PM

Quote:

Originally Posted by Sordrak (Post 38061)
I guess i just ran into this here... LibAddonMenu present in an old version and me only supporting the new one.

No idea of how i should feel supporting both versions at the moment o_O

Thanks for the info btw. :)

It should be fine if they have LAMr29 installed as a standalone

Baertram 05/11/19 01:32 PM

Quote:

Originally Posted by Sordrak (Post 38061)
I guess i just ran into this here... LibAddonMenu present in an old version and me only supporting the new one.

No idea of how i should feel supporting both versions at the moment o_O

Thanks for the info btw. :)

I did it like described above.
First check if the global variable LibAddonMenu2 exists and use it for your local instance of LAM, and if not check if LibStub is loaded and load the lib via this way.
After this check if your local instance of LAM is there and if not abort your addon with an error message (e.g. use assert() function to do so).

Sordrak 05/11/19 02:39 PM

Quote:

Originally Posted by Baertram (Post 38063)
I did it like described above.
First check if the global variable LibAddonMenu2 exists and use it for your local instance of LAM, and if not check if LibStub is loaded and load the lib via this way.
After this check if your local instance of LAM is there and if not abort your addon with an error message (e.g. use assert() function to do so).

Yes and no.

I agree with the approach of moving the libraries directly to the AddOn folder and getting rid of lib directories within AddOns.

Furthermore, i agree with the approach of removing the LibStub part. That's actually why I began to change my AddOns.

Yet I didn't expect this behavior at the beginning and I don't think the benefit is really huge in the way things are currently.

What I expected was that the AddOn doesn't get loaded at all without the dependencies. The behavior should be managed directly by ZOS / ESO trough DependsOn. Yet, I find myself having to add additional code (instead of getting rid of it) to verify if there isn't a library loaded the old way.

Which actually means for me that the benefit isn't huge. If I want the AddOn to run everywhere fine, I would still have to add the library to my AddOn as otherwise it wouldn't run and I would have to handle that case. I don't see an assert / printing a message as very useful or the way I'd like it to be.

Not sure how I'll adjust my AddOn now... guess I'll see.

Baertram 05/11/19 02:58 PM

If you don't want the library to be loaded without dependency then maybe include/or not the library within your addon's folder BUT don't load it from your addon's txt file but let it have it's own librray's txt file and use the DependsOn in your addon's txt file.
This way you provide the lib and your addon should work as expected and NOT load if the lib is missing/get's removed.

Adding additional code is curently only needed for the phase where libraries might exist as version with and w/o LibStub.
My approach would be to remove LibStub completely and let addons crash so they need an update but this will break older unmaintained addons as well and thus is not the wanted behaviour (I wouldn't mind as it's easy to ask and fix them as well but some ppl here just want everything to be running smooth and fine. Remembering the wide user reactions on the library changes in the past I can understand them... Not all of the users seem to wish to get a fix but love to simply complain and rage :rolleyes: )

Kyoma 05/11/19 03:04 PM

You don't actually need the assert/debug line to see if the library isn't loaded because you are already using ##DependsOn and users need to install it seperately anyway. Even if the LAM instance that is loaded comes from an (older) addon that had it embedded (with its manifest) it still loads with LibStub through that.

I agree you'd still need this (taking LibPotionBuff as an example):
Code:

    local lpb = LibPotionBuff
    if lpb == nil and LibStub then lpb = LibStub("LibPotionBuff") end

Instead of this tho
Code:

    local lpb =  LibStub("LibPotionBuff")
But that is mainly because the user might have a LAM version installed that still used LibStub because this is kind of a transition period.

Rhyono 05/11/19 03:47 PM

If you're relying on a library that hasn't switched yet: you're stuck for now, but this is just the first step in getting away from it.

In regards to LAM, if someone hasn't updated to the version of LAM that allows direct access to LAM (r28+) and they use my addons that requires that: I'm just letting it break. I'm not bothering to support old versions of LAM when there's a new version.

Baertram 07/29/19 08:40 AM

Updated the Wiki with some library information:
https://wiki.esoui.com/Libraries

Drakanwulf 07/29/19 10:36 AM

Nicely done, Baertram. Thanks for updating the wiki.

And thanks for the information about why a "/libs/..." directory has to exist. I did not know that the game automatically overwrites existing add-on programs in the /AddOns/... folder when embedded or included add-on programs are included at the same level as their host add-on (the one that's being loaded) program.

Baertram 07/29/19 11:15 AM

Basically it's the zip extraction software which will do this or Minion (if used).
If you build a zip archive containing 2 folders, 1 for your addon and 1 for a library (or like another addon did in the past "Libraries for addon xyz": All needed libraries as own folders in a zip archive) the software will extract the zip and extract all folders to the "AddOns" directory directly then.

Minion will overwrite other exisitng folders afaik (maybe only those which got the name of the installed Addon, but I'm not sure about this).
If you manually extract the zip archive and the popup says "Overwrite existing ..." and you press Yes (what you will do if the addon existed already :o) it will overwrite the existing library folders as well.

Edit:
It does not need to be a /libs/ directory. You could also ship the library within your addons directory directly, without a subfolder.
/Addons/YourAddon/LibAddonMenu-2.0/LibAddonMenu-2.0.txt
Maybe it's easier to "find" and "read" though if it's a /lib/ subfolder.

Just don't add the library directly to the zip's folder depth 0 (which will be the AddOns directory after extraction).

sirinsidiator 07/29/19 02:37 PM

Yeah. Minion 3 will simply overwrite the folder without any warning. The worst part, it won't even recognize that it just replaced your new and shiny LAMr29 with an old LAMr23 and will continue to show it as up to date. Not entirely sure yet how to properly solve this in Minion 4. One idea I have discussed with Dolby is to reject uploads that contain folders named after the manifest of another addon on the root level of the archive, but that won't help with the addons that already exist and do this.

Baertram 07/29/19 02:42 PM

Quote:

The worst part, it won't even recognize that it just replaced your new and shiny LAMr29 with an old LAMr23 and will continue to show it as up to date.
Not sure how Minion works there but I guess it stores the updated version from the server into the Minion.xml and that's it (today).


Couldn't Minion 3/4 scan the addons directory after finishing an update/an update batch for multiple addons and read the manifest txt files to check if the versions in there are the same as the Minion server's version of the addon/library? Something like a check after update again.
Outdated addons or libs should then be shown the "Update" button again.

Drakanwulf 07/30/19 11:24 AM

Or Minion could scan and retain the folder names in the ##DependsOn: directives family and use the ESOUI catalog versions for any embedded folders whose names already exist in the ESOUI catalog.

The ESOUI catalog maintenance program(s) could also scan and retain folder names from any subordinate directories they find as well. This option would close the door on developers who don't like or don't use Minion and write their manifest.txt files that way too.

I think adding these options might give users who insist on embedding libraries in their add-ons the debatable benefit of automatic updates to the latest and greatest versions of the embedded libraries in their add-ons.

I think I may have read something about doing something like this in another set of posts on Gitter or here.

Hydra9268 08/08/19 03:16 AM

Quote:

Originally Posted by Scootworks (Post 37916)
BURN IT ALL DOWN! :-)

bUt dO YoU hAvE fIRe?!

Marazota 08/15/20 04:25 AM

Quote:

Originally Posted by sirinsidiator (Post 37909)
I believe this can be done in 3 "easy" steps:

1) Update libraries to provide an alternative way of being accessed.
This step shouldn't introduce any major compatibility issues as we still keep everything as is and addons that have not been updated can use LibStub as a method to access the library as before. It's just to pave the way to phase out library access via LibStub in addons
All that should be necessary is to extend the code like this:
Lua Code:
  1. local MAJOR, MINOR = "LibSomething", 3
  2. local lib = LibStub:NewLibrary(MAJOR, MINOR)
  3. if not lib then
  4.     return
  5.     -- already loaded and no upgrade necessary
  6. end
  7.  
  8. LibSomething = lib -- new way to access it without LibStub


In the manifest we also add the "AddOnVersion" and "IsLibrary" directive:
Code:

## AddOnVersion: 3
## IsLibrary: true

That's not strictly necessary until after LibStub has been removed from the lib, but it will ensure that only the newest standalone version is loaded (embedded versions will behave as before) and also move it to the new library section in the addon menu once Elsweyr is released.

2) Find all addons that use a library and change them (or request it) to access dependent libraries via the newly introduced global variable instead of LibStub, remove its files from the addon manifest (so it is no longer embedded) and change from OptionalDependsOn to DependsOn.
Lua Code:
  1. local LS = LibStub("LibSomething")
should become
Lua Code:
  1. lobal LS = LibSomething


3) Update libraries to no longer use LibStub. This will likely cause compatibility issues with any addons that have not been updated in step 2, but at some point we just need to pull the trigger, otherwise LibStub won't ever disappear completely.

Lua Code:
  1. local lib = {}
  2. LibSomething = lib

Let me know what you think. Did I miss anything? Who's on board?
I will start with step 1 in LAMr28 and will introduce the new global variable "LibAddonMenu".

i did step 2 but still got errors
what to change?

need to change something here? commenting libstub line didnt help

Code:

-- INITIALIZATION
-----------------------------------------------------------------------------------------------------------------------------------
function IA_InventoryAssistant:New ( control )
  local inventoryAssistant = ZO_Object.New ( self )
  inventoryAssistant:Initialize ( control )
  return inventoryAssistant
end
-----------------------------------------------------------------------------------------------------------------------------------
function IA_InventoryAssistant:Initialize ( control )
  EH:RegisterForEvent ( self.name, EVENT_ADD_ON_LOADED, function ( event, addonName )
      if addonName ~= self.name then return end
      EH:UnregisterForEvent ( self.name, EVENT_ADD_ON_LOADED )

      self.settings = ZO_SavedVars:NewAccountWide ( "InventoryAssistantSettings", 1, nil, self.defaults )
      --self.async = LibStub( "LibAsync" ):Create ( self.name )
     
      self.onlyDuplicates = self.settings.onlyDuplicates
      self.onlyMarkedItems = self.settings.onlyMarkedItems
      self.onlyLoots = self.settings.onlyLoots
      self.groupLoots = self.settings.groupLoots
      self.showCrafted = self.settings.showCrafted

lines i changed now looks like this

Code:

-- LOCAL FUNCTIONS
-----------------------------------------------------------------------------------------------------------------------------------
local EH = LibEventHandler
local menu = LibCustomMenu
local LAM = LibAddonMenu

errors in game

Code:

user:/AddOns/InventoryAssistant/InventoryAssistant.lua:471: attempt to index a nil value
stack traceback:
user:/AddOns/InventoryAssistant/InventoryAssistant.lua:471: in function 'IA_InventoryAssistant:Initialize'
|caaaaaa<Locals> self = [table:1]{}, control = ud </Locals>|r
user:/AddOns/InventoryAssistant/InventoryAssistant.lua:466: in function 'IA_InventoryAssistant:New'
|caaaaaa<Locals> self = [table:2]{version = "1.15.180704-beta", name = "InventoryAssistant"}, control = ud, inventoryAssistant = [table:1] </Locals>|r
user:/AddOns/InventoryAssistant/InventoryAssistant.lua:1499: in function 'IA_InventoryAssistant_OnInitialize'
|caaaaaa<Locals> control = ud </Locals>|r
IA_Main_Initialized:3: in function '(main chunk)'
|caaaaaa<Locals> self = ud </Locals>|r


Kyoma 08/15/20 11:18 AM

A quick fix (most likely), change it to this:
Code:

self.async = LibAsync:Create ( self.name )

Marazota 08/15/20 01:37 PM

Quote:

Originally Posted by Kyoma (Post 42113)
A quick fix (most likely), change it to this:
Code:

self.async = LibAsync:Create ( self.name )

thanks, tried that, same error

Code:

user:/AddOns/InventoryAssistant/InventoryAssistant.lua:471: attempt to index a nil value
stack traceback:
user:/AddOns/InventoryAssistant/InventoryAssistant.lua:471: in function 'IA_InventoryAssistant:Initialize'
|caaaaaa<Locals> self = [table:1]{}, control = ud </Locals>|r
user:/AddOns/InventoryAssistant/InventoryAssistant.lua:466: in function 'IA_InventoryAssistant:New'
|caaaaaa<Locals> self = [table:2]{version = "1.15.180704-beta", name = "InventoryAssistant"}, control = ud, inventoryAssistant = [table:1] </Locals>|r
user:/AddOns/InventoryAssistant/InventoryAssistant.lua:1499: in function 'IA_InventoryAssistant_OnInitialize'
|caaaaaa<Locals> control = ud </Locals>|r
IA_Main_Initialized:3: in function '(main chunk)'
|caaaaaa<Locals> self = ud </Locals>|r








may be its because this library, using withing addon, not ready to work without libStub ?

https://www.esoui.com/downloads/info...ntHandler.html

Rhyono 08/15/20 02:38 PM

You'll have to remove the LibStub dependency from there too.

Marazota 08/15/20 03:52 PM

Quote:

Originally Posted by Rhyono (Post 42115)
You'll have to remove the LibStub dependency from there too.

in the library, i changed manifest like in step 1)
also this

Code:

local MAJOR, MINOR = "LibEventHandler-1.1", 1.0
local LEH, LEHminor = LibStub:NewLibrary(MAJOR, MINOR)
if not LEH then return end

to this

Code:

local MAJOR, MINOR = "LibEventHandler", 1.1
local LEH, LEHminor = LibStub:NewLibrary(MAJOR, MINOR)
if not LEH then return end

LibEventHandler = LEH, LEHminor

now i am getting another error

Code:

user:/AddOns/InventoryAssistant/InventoryAssistant.lua:654: attempt to index a nil value
stack traceback:
user:/AddOns/InventoryAssistant/InventoryAssistant.lua:654: in function 'IA_InventoryAssistant:InitializeSettingsMenu'
|caaaaaa<Locals> self = [table:1]{showFCOISGearSetMarkers = T, showEnchants = T, onlyMarkedItems = F, showBound = T, showItemLevels = T, onlyNonCP160 = F, onlyDuplicates = F, onlyCP160 = F, showNonSetItems = T, onlyLoots = F, showMonsterSets = T, showCrafted = T, groupLoots = T, showBuyable = T, showFCOISDynamicMarkers = T} </Locals>|r
user:/AddOns/InventoryAssistant/InventoryAssistant.lua:502: in function 'eventToFunctionTable'
|caaaaaa<Locals> event = 65536, addonName = "InventoryAssistant" </Locals>|r
user:/AddOns/InventoryAssistant/libs/LibEventHandler/LibEventHandler.lua:15: in function 'CallEventFunctions'
|caaaaaa<Locals> eventCode = 65536, numOfFuncs = 1, i = 1 </Locals>|r



All times are GMT -6. The time now is 05:28 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI