DataObject.GetAttachedObject

Prototypes

Object GetAttachedObject( String sName )

Return Value

The return value is a reference to the attached Java object. If there is no attachment with the specified name, the return value is null.

Parameters

String sName
The name of the attachment.

Remarks

This method returns the attachment with the specified name. The attachment must have been added using the method AddAttachedObject.

The DataObject class enables you to add attachments to a DataObject. This enables you to associate additional information about the data in a DataObject with the DataObject itself. The DataObject does not use your attachments. Note that attachments exist only in memory. They are not stored when you store the DataObject.

Example
declare DataObject dobj = DataObject.Create( "Example" );
dobj.AddVar( "X", rannor(1:100) );

declare Histogram hist = Histogram.Create( dobj, "X" );
dobj.AddAttachedObject( "Histogram", hist );

declare Plot plot;
plot = (Plot)dobj.GetAttachedObject( "Histogram" );
plot.SetGraphAreaBackgroundColor( ORANGE );
See Also

DataObject.AddAttachedObject