promotional bannermobile promotional banner

LibTasks-1.0

Experimental
Storage library for tasks.

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.

The LibTasks-1.0 Team

profile avatar
  • 8
    Projects
  • 33.6K
    Downloads

More from _ForgeUser30210View all

  • LibMapTileData-1.1 project image

    LibMapTileData-1.1

    • 1.0K
    • Addons

    Contains map data and functions to convert continent coordinates to minimap texture tiles.

    • 1.0K
    • October 12, 2012
    • Addons
    • +1
  • LibSidePanel-1.0 project image

    LibSidePanel-1.0

    • 5.1K
    • Addons

    Frame layout manager for side panels.

    • 5.1K
    • December 18, 2011
    • Addons
  • FixJoinBGAsGroup project image

    FixJoinBGAsGroup

    • 3.7K
    • Addons

    Fixes the unintuitive and inconsistent behaviour of join as group for battlegrounds.

    • 3.7K
    • October 22, 2011
    • Addons
  • FixThoseNames project image

    FixThoseNames

    • 0
    • Addons

    Changes various names in the game.

    • 0
    • July 8, 2011
    • Addons
    • +3
  • LibMapTileData-1.1 project image

    LibMapTileData-1.1

    • 1.0K
    • Addons

    Contains map data and functions to convert continent coordinates to minimap texture tiles.

    • 1.0K
    • October 12, 2012
    • Addons
    • +1
  • LibSidePanel-1.0 project image

    LibSidePanel-1.0

    • 5.1K
    • Addons

    Frame layout manager for side panels.

    • 5.1K
    • December 18, 2011
    • Addons
  • FixJoinBGAsGroup project image

    FixJoinBGAsGroup

    • 3.7K
    • Addons

    Fixes the unintuitive and inconsistent behaviour of join as group for battlegrounds.

    • 3.7K
    • October 22, 2011
    • Addons
  • FixThoseNames project image

    FixThoseNames

    • 0
    • Addons

    Changes various names in the game.

    • 0
    • July 8, 2011
    • Addons
    • +3