LibTasks-1.0

This project is experimental.

This project is only experimental and may change drastically between now and when it comes out of experimental status. It may even be disapproved once that happens, worst-case.

Be forewarned before downloading anything from this project.

A library for tasks

Tasks can be various things, for example "kill Nalak this week" or "use your tradeskill cooldown today". The library does only store (not between sessions) tasks and propagate changes to interested listeners, it does not create tasks on its own nor does it display them.

Task sources

For creating a task you should see the AddOrUpdateTask method, you can also remove tasks using the RemoveTask method. When ever a task is changed you should call the AddOrUpdateTask method again.

Task displays

An example maybe explaines this best, you will need to add code for displaying the tasks somewhere in the callback methods. Example:

local libTasks = LibStub:GetLibrary('LibTasks-1.0')

function addon:OnEnable()
    libTasks.RegisterCallback(self, 'LibTasks_NewTask')
    libTasks.RegisterCallback(self, 'LibTasks_ChangedTask')
    libTasks.RegisterCallback(self, 'LibTasks_RemovedTask')
end

function addon:OnDisable()
    libTasks:UnregisterAllCallbacks()
end

function addon:LibTasks_NewTask(event, taskData)
     -- do something
end

function addon:LibTask_ChangedTask(event, taskData)
     -- do something
end

function addon:LibTasks_RemovedTask(event, taskData)
     -- do something
end

taskData table

The taskData table specification is still open for extension/changes.

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Apr 25, 2013
Category
Last update
May 03, 2013
Development stage
Alpha
License
GNU Lesser General Public License version 3 (LGPLv3)
Downloads
21
Recent files

Authors

Relationships

Embedded library
CallbackHandler-1.0
LibStub