GetAt

PowerBuilder Native Interface

PBObjectArrayAccessor class:

GetAt method

Description

Obtains the array item at the specified dimension.

Syntax

GetAt(pblong dim[])

Return Values

pbobject.

Argument

Description

dim

The dimension of the array item to be set

Examples

This example shows the use of GetAt in an object array:

PBObjectArrayAccessor aa(session, *array_val);
for (i=0;i<itemcount2;i++)
{
   dim[0] = i+1;
   oarg = aa.GetAt(dim);
   cls = session->GetClass(oarg);
   if( cls == NULL )
     return;
   fid = session->GetFieldID(cls, "text");
   if ( fid == 0xffff)
     return;
   fid_pv = session->GetFieldAddress(oarg,fid);
   mystr = fid_pv->GetString();
   ostr_a[i] = session->GetString(mystr);
}

See Also