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

<@OBJECTS></@OBJECTS>

Syntax

<@OBJECTS OBJECT=objectvariable ITEMVAR=itemvariablename [SCOPE=objectscope] [ITEMSCOPE=itemvariablescope] [START=start] [STOP=stop]></@OBJECTS>

Description

This meta tag loops through collection and iterator objects in variables returned by COM object and JavaBean method calls.

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 ITEMVAR attribute defines the name of the variable in which to put the current item, and the optional ITEMSCOPE attribute defines the scope of the current item variable.

If the optional START attribute is specified, the loop skips the first (START-1) objects. If the attribute value is not a number, it is ignored. If the optional STOP attribute is specified, the loop stops after processing the item number given. If the attribute value is not a number, it is ignored.

Example

The following example loops through a collection object in local$foo that contains e-mail messages, and calls methods on each object within the collection to return Subject and Contents of the e-mail messages, and set the read flag:

<@OBJECTS OBJECT=foo SCOPE=local ITEMVAR=local$currItem>Here is your unread mail:<B>
<@IF EXPR="!(<@CALLMETHOD OBJECT=local$currItem METHOD=ReadFlag() METHODTYPE=GET>)">
<@CALLMETHOD OBJECT=local$currItem METHOD=Subject() METHODTYPE=GET></B><BR>
<@CALLMETHOD OBJECT=local$currItem METHOD=Content() METHODTYPE=GET><BR>
<@CALLMETHOD OBJECT=local$currItem METHOD=ReadFlag(1) METHODTYPE=SET>
<HR></@IF></@OBJECTS>

See Also

<@CALLMETHOD>
<@GETPARAM>
<@CREATEOBJECT>
<@NUMOBJECTS>
<@OBJECTAT>



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

docs@pervasive.com
Copyright © 1999, Pervasive Software. All rights reserved.