ESOUI - View Single Post - Let's get rid of LibStub!
View Single Post
04/30/19, 08:05 PM   #14
Drakanwulf's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2017
Posts: 50
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!" )
  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?
Drakanwulf, the dire wolf that hunts dragons!

Last edited by Drakanwulf : 04/30/19 at 09:11 PM.
  Reply With Quote