Creating property and setting value:
In this object it is possible to create new properties with given name and value (contrary to other objects).
New property is created by first write.
For example:
In the
mMap object, there is a new property "
xyz" containing the
3.14 value. Assigning new value into this property only changes the value of this property.
Properties in this object can be created or set also by the
mapLoadFromString or
mapSetValueAt method.
Caution: In the
Web panel that is written in the
VBScript language it is not possible to create property just by assigning the value. In this case the
mapSetValueAt method can be used.
Read property value:
JavaScriptVBScriptSelect and copy to clipboard
var val = mMap.xyz;
Dim val
val = mMap.xyz
Property value in this object can also by read by the
mapGetValueAt method.
Comparison of objects used for data storage:
The following object types can be used for holding values (of any data type). Each of these objects has certain advantages and disadvantages and the choice depends on the desired usage.
PmArray: This object contains values that are accessible by index into the array - it is possible to read any value at any time in this object. Reading and writing values is very fast, but adding is slow.
This object is functional only for
JavaScript language. For the
VBScript language the array is represented by
Array data type.
PmMap: This object contains values that are addressed by name (text identifier). Value names represent object properties. The advanatege is the "clarity" of usage in the script code. The disadvantage is the inability to access the values in cycle by index.
PmBuffer: This object contains binary values in the data block. For reading/writing of individual value it is necessary to know its position (offset) in the data block and also the data type (size).