Then you had LibStub installed in stand-alone form (as an AddOn with its own ToC) and your AddOns are installed in nolib form, which means they don't include the libraries required for their operation - their required libraries are loaded as stand-alone AddOns.
You should either put LibStub back or re-install all of your AddOns in non-disembedded form. When writing an AddOn on CurseForge or WoWAce, you should set up your ToC and .pkgmeta for both embedded (libraries included) and disembedded (no libs - user must download those as well) forms, or simply forego using the version control mechanisms, embed your libraries directly in your AddOn, and upload a zip file to CurseForge.
The problem is trying to find out why the latest version ace shared media widgets causes the statusbar drop down to appear bright instead of the usual grey color.
All I did was like he said, took the ace shared media lib which has it's own lib stub and installed it into interface/addon folder.
Basically theres two libstubs one from ace and one that comes with the ace shared media lib. I don't knpw anything about .pkgmeta. My knowledge on how libraries work is really limited all I need to know is where to put them and how to use them with my addon.
Every addon I have comes with its own lib. Seems pretty standard now.
I don't normally put libs as standalone but he wanted me to see if anything would change.
Heres a directory of the what I got installed in the addon folder:
Directory of C:\Program Files (x86)\World of Warcraft\Interface\AddOns\AceGUI-3.0-SharedMediaWidgets
09/19/2010 01:00 AM <DIR> .
09/19/2010 01:00 AM <DIR> ..
09/19/2010 12:26 AM <DIR> AceGUI-3.0-SharedMediaWidgets
07/25/2010 05:27 PM 489 AceGUI-3.0-SharedMediaWidgets.toc
07/25/2010 05:27 PM 5,979 Changelog-AceGUI-3.0-SharedMediaWidgets-v3.4.1.txt
09/19/2010 01:00 AM 0 txt
07/25/2010 05:27 PM 240 widget.xml
4 File(s) 6,708 bytes
3 Dir(s) 81,892,122,624 bytes free
Volume in drive C is SYSTEM
Volume Serial Number is 241A-6E03
Directory of C:\Program Files (x86)\World of Warcraft\Interface\AddOns\AceGUI-3.0-SharedMediaWidgets\AceGUI-3.0-SharedMediaWidgets
09/19/2010 01:01 AM <DIR> .
09/19/2010 01:01 AM <DIR> ..
07/25/2010 05:27 PM 6,602 BackgroundWidget.lua
07/25/2010 05:27 PM 6,598 BorderWidget.lua
07/25/2010 05:27 PM 6,078 FontWidget.lua
07/25/2010 05:27 PM 8,947 prototypes.lua
07/25/2010 05:27 PM 7,773 SoundWidget.lua
07/25/2010 05:27 PM 6,490 StatusbarWidget.lua
09/19/2010 01:01 AM 0 txt
07/25/2010 05:27 PM 402 widget.xml
8 File(s) 42,890 bytes
2 Dir(s) 81,892,118,528 bytes free
And that's how I had it installed in my addon. So don't really understand what you mean by libstub not getting loaded. The errors don't even have my addon name in them. They're coming from ace shared media lib its self.
So any idea if there is a bug in ace3 shared media lib, anything else I need to do to test?
Did another test, disabled every addon but my own, and the statusbar drop down was still bright. So that rules out any possible conflicts with other addons. When my addon loads is it causing other addons to use the new lib in my addon?
That would explain why the other addons dropdown for statusbar goes bright as well.
When my addon loads is it causing other addons to use the new lib in my addon?
if you have a newer version, yes.
if yours was older then it wouldnt load and would just use the higher version that is already loaded. if yours is higher then it replaces the existing library and everyone points to that (until some other mod loads a newer version).
Edit2: also i just figured out your problem, you do not have one :P
in the 3.3.x and before versions i basically hacked the acegui dropdown to display the all the bars and for some reason they ended up behind something thus getting darker. in the 3.4.x versions i completely rewrote the dropdown so it doesn't rely on the acegui dropdown widget anymore and was thus able to display the textures in their full glory (without any coloring/tinting so that nothing gets lost due to lost contrast)
I see well the only suggestion I have is to some how make the labels easier to read. Well glad I wasn't doing anything wrong then :)
About uploading, I got a project waiting to be accepted by admin on curse. Then I'm going thru the walkthru on how to upload projects and have libs and stuff automatically added. Using TortoiseSVN. Its complicated, but I find it less work in the longrun since I don't have to upload every time a lib changes.
I didn't even know the server added libs automatically till last night.
So hopefully this week i'll have an alpha up that can be downloaded, but it'll be really rough I'm totally new to SVN.
... less work in the longrun since I don't have to upload every time a lib changes.
Well, since the packager only creates a new zip for your addon (with the latest library versions at the time) when you make a new version of your addon, and not every time one of the embedded libraries changes, it's only less work in the sense that you don't have to make the zip yourself.
Well, since the packager only creates a new zip for your addon (with the latest library versions at the time) when you make a new version of your addon, and not every time one of the embedded libraries changes, it's only less work in the sense that you don't have to make the zip yourself.
Its still not really required to re-package for every lib update, unless a bug was fixed that your addon suffered from, of course.
No, that's what I meant. Since the packager doesn't create more zips than he'd create by hand, the only effort you save by having the packager make your zips is not having to make that number of zips yourself. There are other benefits to using version control, of course, but as far as zip creation goes, that's the only difference.
I also added LibSharedMedia to my addon, but I have a couple of questions.
I don't want the default graphics in the list, but if I replace them in LibSharedMedia-3.0.lua, then that would probably mess with other mods using LSM, wouldn't it? If I rename the lua and whatnot, can I then use it to talk just between my Addon and its own skins, and nobody else? Would making a new library name be a bad idea?
Is there any way to register graphics as a pair, in LSM? What I mean is, I can't seem to import a graphic into wow that's over 1024 px wide. Most monitors sold these days are 1400px wide or more. If I stretch a background that's 1024px to 1400px, then it looks fuzzy, of course. So instead, all of my backgrounds are 2 graphics, each 1048 wide, in order to avoid being fuzzy. Can I take a set of 2 graphics and register them to show up as just 1 item in the drop-down list?
I don't want the default graphics in the list, but if I replace them in LibSharedMedia-3.0.lua, then that would probably mess with other mods using LSM, wouldn't it?
Yes, though I can't think of any compelling reason to remove the default media. You can set which media your addon uses by default.
If I rename the lua and whatnot, can I then use it to talk just between my Addon and its own skins, and nobody else? Would making a new library name be a bad idea?
Yes, and yes. The only reason to use a library for handling media is to share it between addons. If you don't want other addons to be able to use your media, and you don't want your addon to use "foreign" media, just don't use a library. Creating a "new" library just for your addon is a really bad idea for a number of reasons.
Is there any way to register graphics as a pair, in LSM?
No. That said, it wouldn't be hard at all to set up your own table to keep track of "if the user selects SkinX, use SkinX for the left side of the panel and FileX for the right side" and apply that to your addon. LibSharedMedia-3.0 doesn't actually apply any media to your addon. It's not even aware that you are showing a texture anywhere, or using a font. All it does is provide an common interface to a shared list of media.
The only reason to use a library for handling media is to share it between addons. If you don't want other addons to be able to use your media, and you don't want your addon to use "foreign" media, just don't use a library.
I actually did end up using a library to make this work, just a short little one that I patched together. It talks between an addon and its skins. My intention was to make it work like ButtonFacade. Anyone can write a skin for it, but it needs to be done in a certain way.
In my particular case, I'm using this for designing high-res graphics, which require a minimum of 2 panels in the background, if you don't want to stretch out a 1024 px graphic to screen width. I'm glad if someone else wants to make a skin too: shouldn't be hard the way it's set up. Now I can make more skins too, since I can split the files up so I'm not asking people to download 20Megs worth of graphics on every version update.
Anyway, it was actually the only way I could figure out how to make it work. Simply didn't know how to do it elsewise. Is this a case where it's appropriately used?
Making a library doesn't make sense unless you expect other addons to also use the library. If you just want other addons to be able to register skins with your addons, you don't need (and shouldn't use) a library. Here's a simple example of how to set up skins without a library.
First, set up a table that lists the skins included in your addon:
Now other addons can either work with this table directly (assuming MyAddOn is available in the global scope, either with a global variable, or through the GetAddon method of AceAddon-3.0) or you can write a simple function they can call to do it:
function MyAddOn:RegisterSkin(skinName, skinTable)
-- Perform a basic check for valid input.
if type(skinName) ~= "string"
or type(skinTable) ~= "table"
or not skinTable["left"]
or not skinTable["right"] then
return
end
-- Add the skin to the skins table.
self.Skins[skinName] = skinTable
-- Notify the registrant that the skin was successfully registered.
return true
end
Then, set up another simple function to return the left and right textures for the current skin:
function MyAddOn:GetSkin()
local skin = self.Skins[self.db.profile.skin]
if skin then
-- The selected skin exists.
return skin["left"], skin["right"]
else
-- The selected skin doesn't exist, so return some default textures.
return self.Skins["Solid"]["left"], self.Skins["Solid"]["right"]
end
end
Finally, anywhere you want to set the textures, do:
local left, right = self:GetSkin()
self.panel.leftTexture:SetTexture(left)
self.panel.rightTexture:SetTexture(right)
You could even have the skins store other data, such as the width of each texture file, additional textures (middle, top, bottom, etc.), colors, position offsets, etc.
Thanks, I will try that. :) I'm guessing one of the reasons not to use an extra custom Lib if you don't have to, is the odd jump in memory while loading. My addon suddenly started using 1.3 megs right after loading, then drops back to 80k again. I'm assuming my Lib or something in it, created that problem. Your way sounds much better.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
You should either put LibStub back or re-install all of your AddOns in non-disembedded form. When writing an AddOn on CurseForge or WoWAce, you should set up your ToC and .pkgmeta for both embedded (libraries included) and disembedded (no libs - user must download those as well) forms, or simply forego using the version control mechanisms, embed your libraries directly in your AddOn, and upload a zip file to CurseForge.
All I did was like he said, took the ace shared media lib which has it's own lib stub and installed it into interface/addon folder.
Basically theres two libstubs one from ace and one that comes with the ace shared media lib. I don't knpw anything about .pkgmeta. My knowledge on how libraries work is really limited all I need to know is where to put them and how to use them with my addon.
Every addon I have comes with its own lib. Seems pretty standard now.
I don't normally put libs as standalone but he wanted me to see if anything would change.
And that's how I had it installed in my addon. So don't really understand what you mean by libstub not getting loaded. The errors don't even have my addon name in them. They're coming from ace shared media lib its self.
So any idea if there is a bug in ace3 shared media lib, anything else I need to do to test?
That would explain why the other addons dropdown for statusbar goes bright as well.
Normal statusbar dropdown.
http://i219.photobucket.com/albums/cc28/Teyasio/StatusBar_Dropdown_Normal.jpg
Bright statusbar dropdown
http://i219.photobucket.com/albums/cc28/Teyasio/StatusBar_Dropdown_Bright.jpg
if you have a newer version, yes.
if yours was older then it wouldnt load and would just use the higher version that is already loaded. if yours is higher then it replaces the existing library and everyone points to that (until some other mod loads a newer version).
I don't really have an explanation why they would look so different. Perhaps making your addon available for download somehow will be useful.
Edit: done try http://www.wowace.com/addons/ace-gui-3-0-shared-media-widgets/files/41-r34/
Edit2: also i just figured out your problem, you do not have one :P
in the 3.3.x and before versions i basically hacked the acegui dropdown to display the all the bars and for some reason they ended up behind something thus getting darker. in the 3.4.x versions i completely rewrote the dropdown so it doesn't rely on the acegui dropdown widget anymore and was thus able to display the textures in their full glory (without any coloring/tinting so that nothing gets lost due to lost contrast)
About uploading, I got a project waiting to be accepted by admin on curse. Then I'm going thru the walkthru on how to upload projects and have libs and stuff automatically added. Using TortoiseSVN. Its complicated, but I find it less work in the longrun since I don't have to upload every time a lib changes.
I didn't even know the server added libs automatically till last night.
So hopefully this week i'll have an alpha up that can be downloaded, but it'll be really rough I'm totally new to SVN.
Thanks
Well, since the packager only creates a new zip for your addon (with the latest library versions at the time) when you make a new version of your addon, and not every time one of the embedded libraries changes, it's only less work in the sense that you don't have to make the zip yourself.
Its still not really required to re-package for every lib update, unless a bug was fixed that your addon suffered from, of course.
I don't want the default graphics in the list, but if I replace them in LibSharedMedia-3.0.lua, then that would probably mess with other mods using LSM, wouldn't it? If I rename the lua and whatnot, can I then use it to talk just between my Addon and its own skins, and nobody else? Would making a new library name be a bad idea?
Is there any way to register graphics as a pair, in LSM? What I mean is, I can't seem to import a graphic into wow that's over 1024 px wide. Most monitors sold these days are 1400px wide or more. If I stretch a background that's 1024px to 1400px, then it looks fuzzy, of course. So instead, all of my backgrounds are 2 graphics, each 1048 wide, in order to avoid being fuzzy. Can I take a set of 2 graphics and register them to show up as just 1 item in the drop-down list?
Yes, though I can't think of any compelling reason to remove the default media. You can set which media your addon uses by default.
Yes, and yes. The only reason to use a library for handling media is to share it between addons. If you don't want other addons to be able to use your media, and you don't want your addon to use "foreign" media, just don't use a library. Creating a "new" library just for your addon is a really bad idea for a number of reasons.
No. That said, it wouldn't be hard at all to set up your own table to keep track of "if the user selects SkinX, use SkinX for the left side of the panel and FileX for the right side" and apply that to your addon. LibSharedMedia-3.0 doesn't actually apply any media to your addon. It's not even aware that you are showing a texture anywhere, or using a font. All it does is provide an common interface to a shared list of media.
I actually did end up using a library to make this work, just a short little one that I patched together. It talks between an addon and its skins. My intention was to make it work like ButtonFacade. Anyone can write a skin for it, but it needs to be done in a certain way.
In my particular case, I'm using this for designing high-res graphics, which require a minimum of 2 panels in the background, if you don't want to stretch out a 1024 px graphic to screen width. I'm glad if someone else wants to make a skin too: shouldn't be hard the way it's set up. Now I can make more skins too, since I can split the files up so I'm not asking people to download 20Megs worth of graphics on every version update.
Anyway, it was actually the only way I could figure out how to make it work. Simply didn't know how to do it elsewise. Is this a case where it's appropriately used?
First, set up a table that lists the skins included in your addon:
Now other addons can either work with this table directly (assuming MyAddOn is available in the global scope, either with a global variable, or through the GetAddon method of AceAddon-3.0) or you can write a simple function they can call to do it:
It would be used like this:
Then, set up another simple function to return the left and right textures for the current skin:
Finally, anywhere you want to set the textures, do:
You could even have the skins store other data, such as the width of each texture file, additional textures (middle, top, bottom, etc.), colors, position offsets, etc.