RecordSet.addView(object)
| Parameter |
Description |
|---|---|
| object |
An ActionScript object to be notified when the RecordSet object changes. |
Method. Defines an ActionScript object that will receive notifications when the RecordSet object changes. The object must contain a modelChanged function, which takes one parameter, and an event descriptor object. The following table describes the event descriptor messages:
The following example shows the use of the addView method. The modelChanged function displays a trace message with the event type each time the record set changes.
#include "NetServices.as"
function modelChanged(info)
{
trace(info.event);
}
var productList = new RecordSet(["Name","Price","Color"]);
// whenever productlist changes, call this.modelChanged().
productList.addView(this);
// modify the RecordSet object, and see if "modelChanged" gets called
productList.addItem({Name: "milk", Price: 3.50, Color: "0xffffff"});
productList.addItem({Name: "eggs", Price: 1.75, Color: "0xffffff"});
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/asDict29.htm