DataView.GetAttachedInt

Prototypes

int GetAttachedInt( String sName, int nDefaultValue )

Return Value

The return value is the attached integer value. If there is no attachment with the specified name, the return value is nDefaultValue.

Parameters

String sName
The name of the attachment.

int nDefaultValue
The value to return if there is no attachment with the specified name.

Remarks

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

The DataView class enables you to add attachments to a DataView. This enables you to associate additional information about a DataView with the DataView itself. The DataView does not use your attachments.

Example
x = rannor( 1:100 );
declare Histogram plot = Histogram.Create( "Example", x );

count = ncol( loc( x > 0 ) );
plot.AddAttachedInt( "Count X > 0", count );

n = plot.GetAttachedInt( "Count X > 0", -1 );
print n;
See Also

DataView.AddAttachedInt