tp.Dictionary
tp.Dictionary is an ordered key/value store backed by an entry list. It is not the
native JavaScript Map; it is a small Tripous class with methods used by other
Tripous classes, such as localization and name-value lists.
This is a pre-Map class from the older Tripous JavaScript runtime. It remains in the
core library because existing Tripous code still depends on it. New general-purpose application
code may prefer the native Map, but this class is still part of the current
Tripous API.
Keys are compared with strict equality. In practice, most Tripous code uses string keys. The
dictionary preserves insertion order and can return keys, values, and an enumerator over
{ Key, Value } entries.
Current dictionary
The current entries are shown in insertion order.
Set and get
Set() adds a new key or replaces an existing key value.
Get() returns null when the key is missing.
Keys and values
Keys() and Values() return arrays. ValueOf()
accepts a default value.
Enumeration and remove
GetEnumerator() and the native iterator both enumerate entries.
Remove() deletes by key and Clear() deletes all entries.