I'm starting out writing my own Ace3 Addon. Having written software in other languages, I figured this would be a sinch. However, it doesn't seem that way.
I have included all the Ace3-Libs, as described in the WelcomeHome tutorial. Mine is called AddonChecker, and here's the lua in AddonChecker.lua.
I have included the same embeds.xml as in the example I linked above, and I have also ensured that all of those files are in the libs folder.
AddonChecker = LibStub("AceAddon-3.0"):NewAddon("AddonChecker","AceConsole-3.0")
function AddonChecker:OnInitialize()
DEFAULT_CHAT_FRAME:AddMessage("Addon Checker Loaded")
AddonChecker:RegisterChatCommand("ac", "DoCheck")
AddonChecker:RegisterChatCommand("addonchecker", "DoCheck")
end
I'm receiving the following error from BugGrabber when I load / reload my UI:
1x AddonChecker-0.1\AddonChecker.lua:4: Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of "AceConsole-3.0".
AceAddon-3.0-5 (AddonChecker):209: in function `EmbedLibrary'
AceAddon-3.0-5 (AddonChecker):191: in function `EmbedLibraries'
AceAddon-3.0-5 (AddonChecker):158: in function `NewAddon'
AddonChecker-0.1\AddonChecker.lua:4: in main chunk
Obviously, it can't find AceConsole-3.0. But I can confirm it's where it should be, and my embeds.xml is pointing to it. What other simple yet not quite obvious things could cause such an error?
Thanks in advance, and let me know if I need to provide more information (or I threw this in the wrong place).
Put AceGUI after AceConsole and AceConfig, as it depends on those being loaded first. I may be wrong, but the pattern seems alphabetized for load order.
That's actually incorrect. AceConfig depends on AceConsole and AceGUI, not the other way around, and neither AceConsole nor AceGUI depend on anything themselves.
If you're confused about the load order of Ace3 libs, just look in the .toc for the standalone Ace3 package. As per that, the correct load order is:
Your specific problem is (probably) that you're loading AceConfig before AceConsole.
Also, there is no longer any useful reason to have an embeds.xml file. The original purpose of this file was to reduce loading time for standalone library users (since referencing nonexistent files in a .toc file adds significantly to loading times, but referencing them in an .xml file does not), but that purpose was nullified in August 2008 when WowAce joined Curse and did away with the old files.wowace.com packager and WowAceUpdater program. Nowadays it actually increases load time (since it adds an extra file to be read from disk) and adds needless complexity. You should just reference your libs from the .toc file, and (if you're using a WowAce/CurseForge repository) surround them with the appropriate no-lib-strip tags for the packager.
Your specific problem is (probably) that you're loading AceConfig before AceConsole.
Champion!
Putting my includes in the rough order that you mentioned did the trick. Also, thanks for the heads up regarding the redundancy of embeds.xml - I'll end up including the libraries directly in the .toc file.
Thanks again!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have included all the Ace3-Libs, as described in the WelcomeHome tutorial. Mine is called AddonChecker, and here's the lua in AddonChecker.lua.
I have included the same embeds.xml as in the example I linked above, and I have also ensured that all of those files are in the libs folder.
I'm receiving the following error from BugGrabber when I load / reload my UI:
Obviously, it can't find AceConsole-3.0. But I can confirm it's where it should be, and my embeds.xml is pointing to it. What other simple yet not quite obvious things could cause such an error?
Thanks in advance, and let me know if I need to provide more information (or I threw this in the wrong place).
AddonChecker.toc
embeds.xml:
If you're confused about the load order of Ace3 libs, just look in the .toc for the standalone Ace3 package. As per that, the correct load order is:
Your specific problem is (probably) that you're loading AceConfig before AceConsole.
Also, there is no longer any useful reason to have an embeds.xml file. The original purpose of this file was to reduce loading time for standalone library users (since referencing nonexistent files in a .toc file adds significantly to loading times, but referencing them in an .xml file does not), but that purpose was nullified in August 2008 when WowAce joined Curse and did away with the old files.wowace.com packager and WowAceUpdater program. Nowadays it actually increases load time (since it adds an extra file to be read from disk) and adds needless complexity. You should just reference your libs from the .toc file, and (if you're using a WowAce/CurseForge repository) surround them with the appropriate no-lib-strip tags for the packager.
Champion!
Putting my includes in the rough order that you mentioned did the trick. Also, thanks for the heads up regarding the redundancy of embeds.xml - I'll end up including the libraries directly in the .toc file.
Thanks again!