ICapeCollectionItem Method

Gets the specific item stored within the collection, identified by its ICapeIdentification.ComponentName or 1-based index passed as an argument to the method.

Definition

Namespace: CapeOpen
Assembly: CapeOpen (in CapeOpen.dll) Version: 1.0.0.0 (1.0.0.0)
[DispIdAttribute(1)]
Object Item(
	Object index
)

Parameters

index  Object

Identifier for the requested item:

name of item (the variant contains a string)

position in collection (it contains a long)

Return Value

Object
System.Object containing the requested collection item.

Remarks

Return an element from the collection. The requested element can be identified by its actual name (e.g. type CapeString) or by its position in the collection (e.g. type CapeLong). The name of an element is the value returned by the ComponentName() method of its ICapeIdentification interface. The advantage of retrieving an item by name rather than by position is that it is much more efficient. This is because it is faster to check all names from the server part than checking then from the client, where a lot of COM/CORBA calls would be required.

Exceptions

ECapeUnknownThe error to be raised when other error(s), specified for this operation, are not suitable.
ECapeInvalidArgumentTo be used when an invalid argument value is passed, for example, an unrecognised Compound identifier or UNDEFINED for the props argument.
ECapeFailedInitialisationECapeFailedInitialisation
ECapeOutOfBoundsECapeOutOfBounds

See Also