CValueSet:SetType
The SetType method sets the type of values inthe CValueSet to one of the following: "number", "integer", "string", or "boolean". The CValueSet is automatically emptied to prepare for adding new values.
bool = CValueSet:SetType( strNewType ) Sets the type of values in the set, where strNewType is "number", "integer", "string", or "boolean". On failure, returns boolean false. |
The following example creates a CValueSet S and adds members to it, then returns the count of members:
|
-- constructor, default to values of type "number" |
|
-- add a key and value |
|
-- add a key and value |
|
-- add a key and value |
|
-- result: Count = 3 |
|
-- changes the CValueSet object to "string" |
|
-- result: Count = 0 (the CValueSet was emptied) |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.