def length(self) -> int:
"""Return the number of items in the T_ARRAY, T_MAP, T_FUNCTION and T_OBJECT sciter::value."""
if not self.get_type() in (VALUE_TYPE.T_ARRAY, VALUE_TYPE.T_MAP, VALUE_TYPE.T_FUNCTION, VALUE_TYPE.T_OBJECT):
raise AttributeError("'%s' has no attribute '%s'" % (self.get_type(), 'length'))
n = ctypes.c_int32()
ok = _api.ValueElementsCount(self, byref(n))
self._throw_if(ok)
return n.value
评论列表
文章目录