WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Lib Shared Media not loading (https://www.wowinterface.com/forums/showthread.php?t=58160)

Lybrial 08-19-20 12:22 AM

Lib Shared Media not loading
 
Hi,

I have the problem that Lib Shared Media is not loading. I do the following:

My .toc

Code:

## Interface: 80300
## Author: Lybrial
## Version: 1.0.0
## Title: Lybrial UI
## Notes: Lybrial UI
## SavedVariables: LybrialDB
## X-oUF: LybrialUF

## Libs:
libs\libs.xml

## Init
init.lua

My libs:

Code:

<Ui xmlns="http://www.blizzard.com/wow/ui/">

    <!-- the order of the scripts and includes is very important! -->
    <Script file="Ace3\LibStub\LibStub.lua"/>

    <Include file="Ace3\CallbackHandler-1.0\CallbackHandler-1.0.xml"/>
    <Include file="Ace3\AceAddon-3.0\AceAddon-3.0.xml"/>
    <Include file="Ace3\AceEvent-3.0\AceEvent-3.0.xml"/>
    <Include file="Ace3\AceTimer-3.0\AceTimer-3.0.xml"/>
    <Include file="Ace3\AceBucket-3.0\AceBucket-3.0.xml"/>
    <Include file="Ace3\AceHook-3.0\AceHook-3.0.xml"/>
    <Include file="Ace3\AceDB-3.0\AceDB-3.0.xml"/>
    <Include file="Ace3\AceDBOptions-3.0\AceDBOptions-3.0.xml"/>
    <Include file="Ace3\AceLocale-3.0\AceLocale-3.0.xml"/>
    <Include file="Ace3\AceConsole-3.0\AceConsole-3.0.xml"/>
    <Include file="Ace3\AceGUI-3.0\AceGUI-3.0.xml"/>
    <Include file="Ace3\AceGUI-3.0-SharedMediaWidgets\widget.xml"/>
    <Include file="Ace3\AceConfig-3.0\AceConfig-3.0.xml"/>
    <Include file="Ace3\AceComm-3.0\AceComm-3.0.xml"/>
    <Include file="Ace3\AceTab-3.0\AceTab-3.0.xml"/>
    <Include file="Ace3\AceSerializer-3.0\AceSerializer-3.0.xml"/>

    <Include file="LibSharedMedia-3.0\lib.xml"/>
    <Include file="LibKeyBound-1.0\lib.xml"/>
    <Include file="LibDDI-1.0\lib.xml"/>
    <Include file="LibUserSpecifiedConditions\lib.xml"/>
    <Include file="LibActionButton-1.0\lib.xml"/>

    <Include file='oUF\oUF.xml'/>
</Ui>

and in my init I do:

Lua Code:
  1. local ADDON_NAME, NAMESPACE = ...;
  2. local ACE3 = LibStub("AceAddon-3.0");
  3. local ACTION_BUTTON = LibStub("LibActionButton-1.0");
  4. local DB = LibStub("AceDB-3.0");
  5. local DB_OPTIONS = LibStub("AceDBOptions-3.0");
  6. local CONDITIONS = LibStub("LibUserSpecifiedConditions");
  7. local CONFIG = LibStub("AceConfig-3.0");
  8. local CONFIG_DIALOG = LibStub("AceConfigDialog-3.0");
  9. local CONFIG_REGISTRY = LibStub("AceConfigRegistry-3.0");
  10. local GUI = LibStub("AceGUI-3.0");
  11. local HOOK = LibStub("AceHook-3.0");
  12. local LOCALE = LibStub("AceLocale-3.0"):GetLocale(ADDON_NAME);
  13. local LSM = LibStub("LibSharedMedia-3.0");
  14. local OUF = NAMESPACE.oUF;
  15.  
  16. NAMESPACE.CORE = {};
  17. NAMESPACE.LIBS = {};
  18. NAMESPACE.LIBS.ACE3 = ACE3;
  19. NAMESPACE.LIBS.ACTION_BUTTON = ACTION_BUTTON;
  20. NAMESPACE.LIBS.DB = DB;
  21. NAMESPACE.LIBS.DB_OPTIONS = DB_OPTIONS;
  22. NAMESPACE.LIBS.CONDITIONS = CONDITIONS;
  23. NAMESPACE.LIBS.CONFIG = CONFIG;
  24. NAMESPACE.LIBS.CONFIG_DIALOG = CONFIG_DIALOG;
  25. NAMESPACE.LIBS.CONFIG_REGISTRY = CONFIG_REGISTRY;
  26. NAMESPACE.LIBS.GUI = GUI;
  27. NAMESPACE.LIBS.HOOK = HOOK;
  28. NAMESPACE.LIBS.LOCALE = LOCALE;
  29. NAMESPACE.LIBS.LSM = LSM;
  30. NAMESPACE.LIBS.OUF = OUF;

When I start WOW with my addon I get tons of errors that lib shared media is missing:

Code:

Message: ...bs\Ace3\AceGUI-3.0-SharedMediaWidgets\prototypes.lua:10: Cannot find a library instance of "LibSharedMedia-3.0".
Time: Wed Aug 19 08:21:35 2020
Count: 1
Stack: ...bs\Ace3\AceGUI-3.0-SharedMediaWidgets\prototypes.lua:10: Cannot find a library instance of "LibSharedMedia-3.0".
[string "=[C]"]: in function `error'
[string "@Interface\AddOns\Lybrial_UI\libs\Ace3\LibStub\LibStub.lua"]:23: in function `LibStub'
[string "@Interface\AddOns\Lybrial_UI\libs\Ace3\AceGUI-3.0-SharedMediaWidgets\prototypes.lua"]:10: in main chunk

Locals: (*temporary) = "Cannot find a library instance of "LibSharedMedia-3.0"."

Am I doing something wrong with loading libs?

Lybrial 08-19-20 12:42 AM

This can get deleted. Im just stupid. Wrong order of imports.

Need to import LibSharedMedia before AceGUI-3.0-SharedMediaWidgets...

Seerah 08-19-20 11:27 AM

Also, AceGUI-3.0-SharedMediaWidgets is not a part of Ace3, so it's best to not be in that folder.


All times are GMT -6. The time now is 10:34 AM.

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