[TOC] [Prev] [Next] [Bottom]



<@OBJECTAT>

Syntax

<@OBJECTAT OBJECT=variable NUM=index [SCOPE=scope]>

Description

Given an iterator or collection object (returned from a COM or JavaBean method call) and an index, this tag returns a single item from the object.

The OBJECT attribute defines the name of a variable containing an object instance. This must be a collection or iterator. The optional SCOPE attribute defines the scope of the object variable. The NUM attribute sets the index of the item to return (1 is the first item).


! Caution: There is no direct access to collection items; the collection must be stepped through to reach a particular item. This can create poor performance in application files that use this tag.

The <@OBJECTAT> tag is not supported inside an <@OBJECTS> loop. Using it there may generate unpredictable results.


Example

The following assigns the first item in myCollection to myItem.

<@ASSIGN local$myItem VALUE=<@OBJECTAT OBJECT=myCollection SCOPE=user NUM=1>>

Assuming that myIterator is a list of strings, the following example returns the third string.

<@OBJECTAT OBJECT=myIterator NUM=3>

See Also

<@CALLMETHOD>
<@GETPARAM>
<@CREATEOBJECT>
<@NUMOBJECTS>
<@OBJECTS></@OBJECTS>



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1999, Pervasive Software. All rights reserved.