Go to Page... |
Updated: | 06-14-11 07:08 PM |
Created: | 06-11-11 04:29 PM |
Downloads: | 825 |
Favorites: | 2 |
MD5: |
![]() |
Comment Options |
Myrroddin |
View Public Profile |
Send a private message to Myrroddin |
Find More Posts by Myrroddin |
Add Myrroddin to Your Buddy List |
![]() |
|
|
Do you hang out in the IRC room? If so what's your user name?
|
![]() ![]() |
![]() |
Priche |
View Public Profile |
Send a private message to Priche |
Find More Posts by Priche |
Add Priche to Your Buddy List |
![]() |
|
|
Hi Myrroddin, I only use GetLibrary in the sub components. Libra itself uses NewLibrary.
Also, the .Libra thing seems required right now, since Addons are not loaded the same way they were in WoW and Libra is unavailable to things above it in the folder structure even when LibStub is loaded. |
![]() ![]() |
![]() |
Priche |
View Public Profile |
Send a private message to Priche |
Find More Posts by Priche |
Add Priche to Your Buddy List |
![]() |
|
|
LibStub usage
I was noticing your changelog, and decided to have a look at how you were doing things. I noticed you have
Code:
... LibStub:GetLibrary() That might explain why you renamed the folder with a "." at the front. You are telling it to load itself before it has been registered with LibStub, and if not found (which it hasn't been registered, so it LibStub hasn't found it yet) exit out. You will want to remove :GetLibrary() from Libra, and use that call in SlickTimers, as you are doing. You could easily remove the "." from Libra's name, name it "ZZLibra", and so long as you have :NewLibrary() it would not matter, because you have LibStub.lua loading before SlickTimers.lua (as you should) anyway. This is not necessary, as :GetLibrary() is used in main addon files to actually load your lib. As a shortcut, in your main addon SlickTimers, you could change line 3 to the following, but it is optional: Code:
local Libra = LibStub('Libra-alpha', true)
Last edited by Myrroddin : 06-13-11 at 05:43 PM.
|
![]() ![]() |
![]() |
Myrroddin |
View Public Profile |
Send a private message to Myrroddin |
Find More Posts by Myrroddin |
Add Myrroddin to Your Buddy List |
![]() |