::
Here’s a simple test to prove it works:
local objectArray = CC_ObjectArray('name,age')
objectArray.Load('savedObjectArray')
function Main ()
local count = objectArray.Count()
local object = {
age = 20 + count,
name = 'Guy '..count,
}
objectArray.Add(object)
objectArray.Save('savedObjectArray')
end
OptimizedForInterval(60, Main)
Finalize(function ()
local another = CC_ObjectArray('name,age')
local object = {
age = 19,
name = 'Me',
}
another.Add(object)
local all = objectArray.GetAllValueLists()
Log(all.valueList1)
Log(all.valueList2)
another.Concat(objectArray)
local count = another.Count()
Log('Count is '..count)
for i = 1, count do
local object = another.Get(i)
Log(' ')
Log('Age is '..object.age)
Log('Name is '..object.name)
end
end)