Name
SetObjectData -- store private data in an object (V5.0)
Synopsis
SetObjectData(type, id, key$, value)
Library
object

Function
This function can be used to associate any kind of private data with an object. You have to pass the type and identifier of the object as well as a key string under which the data should be stored inside the object structure. value can be any kind of Hollywood data value: It can be a string, a table, a number, or even a function. Everything is possible. If the key specified in key$ is already used inside the object, the old data will be replaced with the new one.

To access the data later, you can use the GetObjectData() function.

See Object types for a list of all object types.

Inputs
type
type of the object to use
id
identifier of the object to use
key$
key under which the data should be stored
value
data to store
Example
SetObjectData(#BRUSH, 1, "brushgroup", "A")
d$ = GetObjectData(#BRUSH, 1, "brushgroup")
The code above stores the value "A" in brush 1 under the key "brushgroup" and then retrieves it again. d$ will be set to "A".

Show TOC