View comments | RSS feed

RecordSet.getItemAt

Availability

Usage

RecordSet.getItemAt(index)

Parameters

Parameter
Description
index
The record number to retrieve.

Return value

A record.

Description

Method. Returns a record if the index if valid and the record is immediately available. If the requested record index number is less than zero or greater than the largest record index number, it returns null. If the index number is valid but the requested record has not yet been downloaded, it returns the string "in progress". Remember that RecordSet object indexes change when they are sorted or records are deleted or added.

Error handling

Error condition
What happens
Error message
Index out of range
Null is returned, and an error message is reported to the Flash MX output window and Debug Console.
RecordSet warning 104: getItemAt(index) index out of range

Example

The following example demonstrates the getItemAt method:

#include "NetServices.as"
var productList = new RecordSet(["ProductName","Price","Color"]);
productList.addItem({ProductName :"Spoon", Price :77, Color :"0x987654"});
var record = productList.getItemAt(0);

See also

Constructor for RecordSet, RecordSet.addItemAt

Comments


ahmedcf said on Sep 24, 2003 at 8:33 AM :
getItemAt(index) devuelve una variable de tipo "Objeto"
en el EJ: record = productList.getItemAt(0);
record devolvera:
record.ProductName="Spoon"
record.Price=77
record.Color=9991764
jrunrandy said on Sep 25, 2003 at 1:26 PM :
In other words, getItemAt returns a variable of type Object.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flashremoting/mx/Using_Flash_Remoting_MX/asDict32.htm