Wowpedia

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

READ MORE

Wowpedia
Register
Line 24: Line 24:
 
* [[Dongle/Events_API|Event API]] - Easy event registration and callback
 
* [[Dongle/Events_API|Event API]] - Easy event registration and callback
 
* [[Dongle/Message_API|Message API]] - Custom event registration and callback system
 
* [[Dongle/Message_API|Message API]] - Custom event registration and callback system
* [[Dongle/Messages|Messages Listing]] - Reference of Messages that sent by Dongle
+
* [[Dongle/Messages|Messages Listing]] - Reference of Messages that are sent by Dongle
 
* [[Dongle/DebugPrint_API|Debug/Print API]] - Debug and Print functionality
 
* [[Dongle/DebugPrint_API|Debug/Print API]] - Debug and Print functionality
 
* [[Dongle/Database_API|Database API]] - Database system for saved variables
 
* [[Dongle/Database_API|Database API]] - Database system for saved variables

Revision as of 12:26, 5 March 2008

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 minimal addon framework that tries to provide those components that are necessary for the bulk of addons, without trying to be a full-featured abstraction of the World of Warcraft API. Rather than providing a java-like library such as Sea, Dongle provides a more pseudo-object oriented approach, allowing you to create a table with basic functionality included.

A basic Dongle addon to print "Hello World" to the default chat frame, waiting until the game is fully initialized looks like this:

HelloWorld = DongleStub("Dongle-1.0"):New("HelloWorld")

function HelloWorld:Enable()
  self:Print("Hello World!")
end

Dongle uses a few simple things to make things easier for both developers and users. The versioning stub included in all Dongle libraries is called DongleStub, and is based off Iriel's embedded framework design. Rather than include DongleStub as a separate file in the distribution, the core Dongle libraries have the latest version of DongleStub included or built into the file distribution. That means to use Dongle, you simply include Dongle.lua and put it in your .toc file.

Dongle systems

Dongle provides a number of simple systems which are included to make your life easier as a developer. They won't toast your bread, but they certainly help in each situation:

  • Module System - Basic module implementation
  • Database System - Provides a comprehensive storage system

Dongle API

You can start exploring the Dongle API from the Core API page, or you can dive in to an individual system:

Help with Dongle

  • Dongle Discussion group on Google Groups [1]
  • #dongle on irc.freenode.net

Templates

Templates for starting an addon that uses Dongle.

  • Addon Template - This shows (basic) use of the slash command and database API

DongleStub based libraries

External links