Cannot setup SharedMediaWidgets lib - Need help
Hi,
I have rewrote my UI and I am trying to setup options in my GUI using the Ace library but I cannot get the Shared Media Widgets working. I decided to set up the libs in the exact same way my old UI use to work (which has no problems) but still I am getting an error and I do not know enough about libraries to fix it myself. I have installed AceGUI-3.0-SharedMediaWidgets and placed it in the libs folder. I have uploaded all the code to GitHub here: https://github.com/Mayron/MayronUI-4 The issue is this: (code found in Core.lua on line 306) Lua Code:
And I get this error: attempt to index global 'AceGUIWidgetLSMlists' (a nil value) So I assume it is not loading the library but I honestly have been spending a long time and I cannot figure out what I screwed up on because I tried following the guide correctly and I have tried my old UI which was setup in near enough the same way which works. Any experts want to explain how bad I am for me? hehe Thanks! |
Do you have the library listed in your TOC file?
|
Quote:
xml Code:
|
Quote:
|
Quote:
Not sure how I embed it if I want to use AceGUI-3.0-SharedMediaWidgets, I tried <Include file="libs\AceGUI-3.0-SharedMediaWidgets\widget.xml"/> but doesn't work, I don't know a lot about this stuff. |
Keep in mind that files are loaded in the order they are listed. Your list of libraries will result in a lot of errors on login, because you're loading libraries that depend on other libraries before the libraries they depend on. For example:
* AceDB-3.0 depends on CallbackHandler-1.0, but you're loading AceDB first. * Part of AceConfig-3.0 depends on AceGUI-3.0, and another part depends on AceConsole-3.0, but you're loading AceConfig before either of those. Also, AceGUI-3.0-SharedMediaWidgets requires both AceGUI-3.0 and LibSharedMedia-3.0, the latter of which isn't mentioned anywhere in the XML you posted, so I have to assume you're not loading it at all. If you don't see any errors, make sure that: 1. You're testing without other addons enabled. If your addon is still called MayronUI, but you're also using Archy, for example, then the libraries in Archy will already be loaded when your addon loads, hiding the problem. 2. You have BugSack installed. The default error display, even if you've turned it on, is incapable of showing errors that occur during the initial loading process, and is therefore useless for addon development. Unrelatedly, I would suggest loading the library's Lua file directly if you know it only has one file, rather than loading an XML file that loads the Lua file. Reading files from disk is by far the slowest part of the loading process, so the fewer files that need to be read, the better. Assuming the file paths themselves are correct, I'd suggest this: xml Code:
|
Quote:
About the unrelated thing, I had it all in the TOC file and did not use the embeds because I want to save on files being loaded and completely agree. When I could not get it to work I tried copying the method I had used before with no luck so yes I will definitely try to cut back on files. I also want to merge more code into one single file because the Modules folder on GitHub now looks horrific. This is exactly what I was after so thanks Phanx :) EDIT: Works perfectly, ty <3 |
Quote:
Quote:
|
As a side note, why are you using an embeds.xml file? Just load the libraries directly from the ToC. With embeds.xml, you are loading two files instead of one. Yes, the Ace3 docs still talk about the xml file, but that is very outdated at this point.
|
The original purpose of an embeds.xml file was to help the original WowAce Updater program identify the libraries used in your addon, so it could correctly download them users who preferred standalone libraries. I used to be one of those, as using standalone libraries will speed up logins and UI reloads by a fairly huge amount if you're using a lot of addons, but after switching from a mechanical HDD to a shiny new SSD a couple years ago, it doesn't make that much difference anymore, and adds a lot of clutter in the addon folder, which I'm looking at a lot as an addon developer, so I no longer install my libs standalone.
Anyway, nowadays the only reason to use an embeds.xml file (or any other XML file that just loads other files) is to keep your TOC more readable, but how often are you really looking at that? :p |
But now that you have an SSD, you need to worry about running out of space instead! :)
|
That's true... I didn't have room on the SSD for the beta client, as it's only got about 30 GB free out of 128, but I plan to upgrade to 256 GB in the near future and use the old one in a media server. Space isn't really an issue overall though; I've got about 6 TB of (total) disk space on my desktop machine, about 1 TB of which is free. ;)
|
All times are GMT -6. The time now is 04:10 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI