improve readme, rename :iterate to :members
This commit is contained in:
@@ -306,10 +306,10 @@ local tsObjectMeta = {
|
||||
error('ts object __len: object has no getCount method', 2) end
|
||||
return tonumber(_bllua_ts.callobj(t._tsObjectId, 'getCount'))
|
||||
end,
|
||||
-- object:iterate()
|
||||
-- object:members()
|
||||
-- Return an iterator for Torque objects with the getCount and getObject methods
|
||||
-- for index, object in group:iterate() do ... end
|
||||
iterate = function(t)
|
||||
-- for index, object in group:members() do ... end
|
||||
members = function(t)
|
||||
if t==nil then
|
||||
error('ts object method: be sure to use :func() not .func()', 2) end
|
||||
if t._deleted then
|
||||
@@ -317,7 +317,7 @@ local tsObjectMeta = {
|
||||
if not (
|
||||
tsIsFunctionNs(t._tsNamespace, 'getCount' ) and
|
||||
tsIsFunctionNs(t._tsNamespace, 'getObject')) then
|
||||
error('ts object :iterate() - '..
|
||||
error('ts object :members() - '..
|
||||
'Object does not have getCount and getObject methods', 2) end
|
||||
local count = tonumber(_bllua_ts.callobj(t._tsObjectId, 'getCount'))
|
||||
local idx = 0
|
||||
|
||||
Reference in New Issue
Block a user