GLG Toolkit, JavaScript Library  Version 4.6
Attaching Custom Data

This group contains methods for associating arbitrary application data with graphical objects. More...

Detailed Description

This group contains methods for associating arbitrary application data with graphical objects.

This is different from Custom Data that can be attached to objects in the GLG Graphics Builder: Custom Data are stored only as GLG D, S or G data objects, while these methods may be used to attach data of an arbitrary type, such as a pointer to a structure.

The attached data are persistent only at run time and are not saved with the object when the drawing is saved.

Functions

Object GetObjectData ()
 Retrieves application data attached to the object via SetObjectData. More...
 
void SetObjectData (Object data)
 Attaches arbitrary application data to the graphical object the method is invoked on. More...
 

Function Documentation

◆ GetObjectData()

Object GetObjectData ( )

Retrieves application data attached to the object via SetObjectData.

Returns
The data attached to the object.

◆ SetObjectData()

void SetObjectData ( Object  data)

Attaches arbitrary application data to the graphical object the method is invoked on.

Parameters
dataThe data that will be attached.