ObjectPoolMixin:GetNextActive()

From Warcraft Wiki
Jump to navigation Jump to search
These functions are implemented in :GetNextActive FrameXML/Pools.lua.

Stateless iterator to cycle through the active and inactive widgets in an object pool.

widget = pool:NextActive([current])
widget = pool:NextInactive([current])

Arguments

current
UIObject?Optional. Could be nil. - Current widget in the list, or nil to start at the beginning.

Returns

widget
UIObject?Optional. Could be nil. - Next widget in the list, or nil when the last widget has been reached.

Details

  • There are no assurances the widgets will be accessed in any particular order.

Example

local widget = pool:NextActive()
while (widget) do
  -- do something
  widget = pool:NextActive()
end

See also

Patch changes

References

 
  1. ^ 2020-04-08, Pools.lua, version 9.0.1.34003, near line 88, archived at Townlong-Yak
  2. ^ 2017-03-28, Pools.lua, version 7.2.0.23835, near line 94, archived at Townlong-Yak