Quantcast
Download
(5 Kb)
Download
Updated: 05/21/19 02:49 PM
Pictures
File Info
Compatibility:
Elsweyr (5.0.5)
Updated:05/21/19 02:49 PM
Created:02/26/19 09:32 AM
Monthly downloads:12,957
Total downloads:179,315
Favorites:251
MD5:
LibPromises  Popular! (More than 5000 hits)
Version: 1.0.3
by: sirinsidiator [More]
A library for Elder Scrolls Online which implements the Promises/A+ specification.

Source can be found on github.

Usage:
Add LibPromises to your addon's dependencies.
Then you can use it like in the following example:
Lua Code:
  1. local Promise = LibPromises
  2.  
  3. local function MyFunction()
  4.     local promise = Promise:New()
  5.     if(math.random() > 0.5) then
  6.         promise:Resolve("hello world")
  7.     else
  8.         promise:Reject("no luck today")
  9.     end
  10.     return promise
  11. end
  12.  
  13. local function MyOtherFunction(message)
  14.     d(message)
  15. end
  16.  
  17. local function MyErrorHandler(message)
  18.     d(message)
  19. end
  20.  
  21. MyFunction():Then(MyOtherFunction, MyErrorHandler)

For more complex examples, check out the activity classes in AwesomeGuildStore or search the web. It follows the spec, so it should be able to do what other language implementations do too.
v1.0.3
- added IsLibrary flag to manifest
- updated API version for Elsweyr
Archived Files (1)
File Name
Version
Size
Uploader
Date
1.0.2
5kB
sirinsidiator
02/26/19 09:32 AM


Post A Reply Comment Options
Unread 04/08/20, 04:55 PM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1417
File comments: 938
Uploads: 36
Re: Newer version

Originally Posted by GoddessFreya
Is there a newer version than 1.0.2 of this addon?
1.0.3 is the current version, which you can readily see when you take a look at the AddOn Info tab or the Change Log tab.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 04/08/20, 03:11 PM  
GoddessFreya

Forum posts: 0
File comments: 2
Uploads: 0
Newer version

Is there a newer version than 1.0.2 of this addon?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.