CoreClasses Xojo Plugin

ObjectDictionary.Item Method (console safe)

Use this setter/getter function to get or set element by a string key.

Item(
   key as String) as Object

Item(
   key as String
   assigns value as Object)

Parameters

key
The string key for the element to get or set. (If the Collection is in multikey mode then only the first element with the specified key will be retrieved or set by this property)
value (assignment parameter)
The object to assign to the item when using the setter.

Returns

Object
The returned item when using the getter.

Remarks

A error code -2 will be when reading if there was no such key existed.
This error code can help you determine if the nil returned was a actually nil object or if the key did not exist.

See Also

ObjectDictionary Class