Go to Page... |
Compatibility: | Deadlands (7.2.5) Waking Flame (7.1.5) Blackwood (7.0.5) Flames of Ambition (6.3.5) Markarth (6.2.5) Stonethorn (6.1.5) Greymoor (6.0.5) |
Updated: | 12/01/21 10:10 AM |
Created: | 01/02/16 10:19 PM |
Monthly downloads: | 1,301 |
Total downloads: | 276,157 |
Favorites: | 166 |
MD5: |
File Name |
Version |
Size |
Uploader |
Date |
2 |
3kB |
Baertram |
10/17/21 08:26 AM |
|
1.4 |
2kB |
Baertram |
05/26/19 12:25 PM |
|
1.3 |
2kB |
Baertram |
05/19/19 04:44 PM |
|
1.2 |
2kB |
Baertram |
09/17/18 04:34 AM |
|
1.1 |
2kB |
Baertram |
08/30/18 12:10 PM |
|
1.0 |
1kB |
circonian |
01/02/16 10:19 PM |
Comment Options |
uladz |
View Public Profile |
Send a private message to uladz |
Find More Posts by uladz |
Add uladz to Your Buddy List |
circonian |
View Public Profile |
Send a private message to circonian |
Send email to circonian |
Find More Posts by circonian |
Add circonian to Your Buddy List |
01/28/16, 09:11 PM | ||||||||
|
Lua Code:
Lua Code:
Okay, so it reduces some bloat. If you need to check for many addons, that may pay off. With just one, not worth it.
In my previous post I actually thought the version info was more useful than plain presence check. Now I'm 100% convinced version info is superfluous. LibStub does that. If an add-on has a public, versioned API, it should publish it via LibStub. Why have another dependency doing the exact same thing?
Last edited by merlight : 01/28/16 at 09:14 PM.
|
|||||||
|
merlight |
View Public Profile |
Send a private message to merlight |
Send email to merlight |
Find More Posts by merlight |
Add merlight to Your Buddy List |
01/28/16, 06:36 PM | ||||
|
This wasn't written with other developers in mind and I had no intention of posting it. I only posted it because another user found it in one of my addons and requested to use it so I posted it for him. I'm not disagreeing with the fact that this library doesn't really offer much, but as for the comments
As for the ON_LOADED, the OptionalDependsOn statement is true...but I don't see why any of it needs to be done in ON_LOADED, just because that's what everyone is used to doing is not a good reason.
I'm not saying the version check is an awesome feature or that it would even prove useful to many, but it was an easy additional feature that I thought might prove useful somewhere/sometime, it is optional, & it is harmless. If a developer checks the version number using a inequality like: >= 2.5 rather than a strict equality or based off of a set of version numbers that he knows it will work for....that's his own fault. Not to mention that your alternative has no way of knowing what version is loaded. How is that better? Even if a developer doesn't know any better and unwisely uses >= 2.5, they are still better off than someone using your method whos not checking a version number at all because at least it will exclude versions < 2.5. Your method is guaranteed to run into the problem/error that you mentioned since you can't check version numbers. But, with the version check option they have the ability to catch & prevent errors such as that. Your example is actually a good example of why the version check could be a good thing. Because if its used properly with a strict equality or the proper inequality (including only versions that are known to be compatible) then when that other addon removes that feature in 3.7 your addon won't have any problems. If a developers complaint is then, but everytime they update their addon I have to update mine to change the dependent version number....then don't use it, its optional. You'll just have to deal with the consequences that when they remove that feature your addon is going to crash, which is no worse off than anyone is now. So I see nothing negative about having a version check.
Last edited by circonian : 01/28/16 at 06:43 PM.
|
|||
|
circonian |
View Public Profile |
Send a private message to circonian |
Send email to circonian |
Find More Posts by circonian |
Add circonian to Your Buddy List |
01/28/16, 08:03 AM | |
|
Sorry for nitpicking, but I think this library is superfluous.
1) Any add-on can check whether another add-on is loaded in their ON_LOADED handler. No need to have a library that does the exact same thing, and query that library. Plus, this extra indirection might conceal the otherwise obvious requirement that you can't make the query inside your ON_LOADED handler unless you have OptionallyDependsOn: in manifest. 2) This library adds version information. That looks nice at first, but encourages bad practice IMO. When you want to cooperate with another add-on, you shouldn't make your decisions around whether its version is >=2.5 or <=4.1. You need a feature/API to be present. That feature might be introduced in 2.5, so you check for version>=2.5, and if the feature is removed in 3.7 you're broken. |
|
merlight |
View Public Profile |
Send a private message to merlight |
Send email to merlight |
Find More Posts by merlight |
Add merlight to Your Buddy List |
01/03/16, 09:45 AM | |
|
Thanks circonian, will implement it into my connected addons so other devs can use it to check stuff (in addition to checking for existing global varibales etc.)
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Send email to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |