User:Tekkub/About Embedded Libraries

From WowAce Wiki

Jump to: navigation, search

This information pertains to pre-Ace2 embeds libs only!

Embedded libraries are designed to be included with the addon that will use it, there is no seperate addon dependancy for the user to deal with. The library will manage it's own versioning, maintaining one copy of every major version registered, and overwriting minor versions with newer copies upon registration.

Embedded libraries may be packaged as a standalone addon with it's own folder and TOC. While this may make things easier for developers you should not redistribte the library as a standalone.

There are three things you must do to make use of an embedded library:

  • Include it's lua and xml files with your addon, in the addon's folder, not as a seperate addon.
  • Add the xml/lua to your addon's TOC so it's loaded (preferrably before your addon's core lua/xml files are)
  • Call <LibraryName>:GetInstance(version), the return from this function can be stored as a local for fast access. Minor version upgrades will not break your local instance.
Personal tools
Support the Site