ObjectPoolMixin :GetNextActive()
Jump to navigation
Jump to search
- These functions are implemented in
.:GetNextActive FrameXML/Pools.lua
- These functions are implemented in
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? - Current widget in the list, or nil to start at the beginning.
Returns
- widget
- UIObject? - 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
- ObjectPoolMixin:EnumerateActive()
- ObjectPoolMixin:EnumerateInactive()
- next() - Generic stateless iterator.
Patch changes
- Patch 9.0.1 (2020-10-13): GetNextInactive() added.[1]
- Patch 7.2.0 (2017-03-28): GetNextActive() added.[2]
References
- ^ 2020-04-08, Pools.lua, version 9.0.1.34003, near line 88, archived at Townlong-Yak
- ^ 2017-03-28, Pools.lua, version 7.2.0.23835, near line 94, archived at Townlong-Yak