Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
Advertisement
AddOn
AddOn article
This page describes fan-made scripting using the World of Warcraft API which has had notable impact on the game's development/history.

Dongle is a small embeddable library to aid developers in addon creation. Is is designed to be as small as possible, but still provide all the essential functions that addons need. It is in no means a complete solution, it aims to provide only the functions that the majority of addons will need, like event handlers, saved variable management and slash command registration.

Methods provided

As of Alpha-0.2.2 the following methods are embedded into the addon's namespace table:

Events

:RegisterEvent(event[, func])

Registers an event handler.

Args
event [String]
The event you are registering for
func [String, function or nil]
The function to be called.
  • If string, self[func](self, event, ...) is called
  • If function, func(event, ...) is called
  • If nil, self[event](self, event, ...) is called

:UnregisterEvent(event)

Unregisters an event handler.

Args
event [String]
The event you are unregistering from

:UnregisterAllEvents()

Unregisers all event handlers for your dongle.

:TriggerEvent(event, ...)

Triggers a custom event. Only other dongles can catch this event.

Args
event [String]
The name of the event you are firing
...
args to be passed to event handlers

Output and Debugging

Saved Variables

Modules

Advertisement