Wikia

WoWWiki

Changes: API EnumerateFrames

Edit

Back to page

m
(Added note about frame iteration order.)
 
Line 1: Line 1:
 
{{wowapi}}
 
{{wowapi}}
   
Returns frame which follows current frame, or first frame if argument is nil.
+
Returns frame which follows current frame, or first frame if argument is nil. The order of iteration follows the order that the frames were created in.
   
 
nextFrame = EnumerateFrames({currentFrame})
 
nextFrame = EnumerateFrames({currentFrame})

Latest revision as of 04:49, June 3, 2008

WoW API < EnumerateFrames

Returns frame which follows current frame, or first frame if argument is nil. The order of iteration follows the order that the frames were created in.

nextFrame = EnumerateFrames({currentFrame})

Parameters Edit

Arguments Edit

({currentFrame})
currentFrame 
Table - current frame or nil to get first frame

Returns Edit

nextFrame
nextFrame 
Table - the frame following currentFrame or nil if no more frames

Example Edit

local frame = EnumerateFrames()
while frame do
    if frame:IsVisible() and MouseIsOver(frame) then
        DEFAULT_CHAT_FRAME:AddMessage(frame:GetName())
    end
    frame = EnumerateFrames(frame)
end

Result Edit

Prints the names of all visible frames under the mouse cursor to the default chat frame.


Around Wikia's network

Random Wiki