Pages

Show Deprecated
Not Creatable
Not Replicated

An object which is essentially a table of pages, each of which is a sorted list of the key/value pairs. When each page contains a list of multiple items, this iterator function may be handy:


function iterPageItems(pages)
return coroutine.wrap(function()
local pagenum = 1
while true do
for _, item in ipairs(pages:GetCurrentPage()) do
coroutine.yield(item, pagenum)
end
if pages.IsFinished then
break
end
pages:AdvanceToNextPageAsync()
pagenum = pagenum + 1
end
end)
end

Which can be used as


for item, pageNo in iterPageItems(myPageObject) do
-- look at item. Pages will advance automatically
end

Summary

Properties

Whether or not the current page is the last page available.

READ ONLY
NOT REPLICATED

Methods


Returns the items on the current page. The keys in the item are determined by the source of this object.

AdvanceToNextPageAsync(): void  YIELDS

Iterates to the next page in the pages object, if possible.

Events

Properties

IsFinished

Read Only
Not Replicated

Whether or not the current page is the last page available.

Methods

GetCurrentPage

Returns the items on the current page. The keys in the item are determined by the source of this object.


Returns

AdvanceToNextPageAsync

void
Yields

Iterates to the next page in the pages object, if possible.


Returns

void

Events