SpellMixin

The SpellMixin interface was added to get spell data without the risk of it returning empty data.
 * Source: FrameXML\ObjectAPI\Spell.lua

API

 * Spell:CreateFromSpellID( spellID ) : spell - Creates an object from a spell ID.

Methods

 * SpellMixin:SetSpellID( spellID )
 * SpellMixin:GetSpellID : spellID
 * SpellMixin:Clear
 * SpellMixin:IsSpellEmpty : boolean
 * SpellMixin:IsSpellDataCached : boolean
 * SpellMixin:GetSpellName : name
 * SpellMixin:GetSpellTexture : texture
 * SpellMixin:GetSpellSubtext : subtext
 * SpellMixin:GetSpellDescription : description
 * SpellMixin:ContinueOnSpellLoad( callbackFunction )
 * SpellMixin:ContinueWithCancelOnSpellLoad( callbackFunction ) : cancelFunc

Example
Some spell data may not have been cached from the server yet. You can use SpellMixin:ContinueOnSpellLoad to asynchronously query the data.

Prints the name and description for a spell.