AceBucket-3.0 Documentation

Getting a hold of AceBucket:

local AceBucket = LibStub:GetLibrary("AceBucket-3.0")
local AceBucket = LibStub("AceBucket-3.0")


or the more common use embed AceBucket into your addon object:

local myAddon = LibStub("AceAddon-3.0"):NewAddon("myAddon", "AceBucket-3.0", ... )

or in a random other object/table:

local AceBucket = LibStub("AceBucket-3.0")
local mytable = {}
AceBucket:Embed(mytable)

AceBucket uses most of the AceEvent and AceTimer libraries for it's scheduling and firing of messages.
It will require those libraries on the first use of RegisterBucketEvent/Message

For the further API documentation we will assume AceBucket embedded into some object.

AceBucket API

addon:RegisterBucketEvent( event, interval[, method] )
	event (string) - Blizzard event to register for.
	interval (number) - Throttling interval
	[method] (string|func) - Method to call when the event is fired. A string method is called like addon[method]( event, [arg, ...] ).
Will fire the event into the method with a table containing the first arguments of the event fired.
Returns a handle to the bucket.		

addon:RegisterBucketMessage( message, inteval[, method] )
	message (string) - Message to register for. 
	interval (number) - Throttling interval
	[method] (string|func) - Method to call when the message is fired. A string method is called like addon[method]( event, [arg, ...] ).
Will fire the message into the method with a table containing the first arguments of the event fired.
Returns a handle to the bucket

addon:UnregisterBucket( handle )
	handle (string) - Bucket to unregister
	
addon:UnregisterAllBuckets()
Unregisters all buckets for this object.


