ObjectPoolMixin :EnumerateActive()
Jump to navigation
Jump to search
- This function is implemented in
.:EnumerateActive FrameXML/Pools.lua
- This function is implemented in
Enumerates widgets in an object pool.
activeIterator = pool:EnumerateActive() inactiveIterator = pool:EnumerateInactive()
Returns
- activeIterator
- function - Unordered iterator (
pairs
) of active widgets, such that for each pair:- key : UIObject - The active (acquired) widget.
- value : boolean - Always
true
.
- inactiveIterator
- function - Ordered iterator (
ipairs
) of inactive widgets, such that for each pair:- index : number - The order that widgets were released, and also the reverse that widgets might be reacquired (last in, first out)
- value : UIObject - The inactive (released) widget.
Example
for widget in pool:EnumerateActive() do
-- doSomething()
end
for __, widget in pool:EnumerateInactive() do
-- doSomething()
end
Patch changes
- Patch 7.2.0 (2017-03-28): Added.[1]
See also
- ObjectPoolMixin:GetNextActive(currentWidget)
- ObjectPoolMixin:GetNextInactive(currentWidget)
References
- ^ 2017-03-28, Pools.lua, version 7.2.0.23835, near line 90, archived at Townlong-Yak