Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!


From WowAce Wiki
Jump to: navigation, search

Please see LibStub on WoWWiki

Embedding specifics for Ace3

Specifically for Ace3 libraries, any library capable of being embedded should provide an :Embed(target) method. The library will then be embeddable during creation of the addon object via :New("MyAddon", lib1, lib2, lib3...).

Libraries wanting to receive signals from AceAddon-3.0 addons regarding enabling/disabling may additionally provide the following functions:

  •  :OnEmbedInitialize(addon)
  •  :OnEmbedEnable(addon)
  •  :OnEmbedDisable(addon)

Note that the library should not export these functions on embed; just having them publically reachable in the library itself is enough.

These functions will be called on addon init/enable/disable for all libraries embedded during creation of the addon object. Libraries :Embed()ed later on will not receive them.