User Guide
1236 TransferObject interface
TransferObject.setPropertyData()
Availability
Flash Player 7.
Edition
Flash MX 2004.
Usage
class yourClass implements TransferObject {
function setPropertyData(propData) {
// Your code here.
}
}
Parameters
propData An object that contains the data assigned to this transfer object.
Returns
Nothing.
Description
Method; sets the data for this transfer object. The propData parameter is an object whose
fields contain the data assigned by the DataSet component to this transfer object.
Example
The following function receives a propData parameter and applies the values of its properties
to the properties of the Contact object:
class Contact implements mx.data.to.TransferObject {
function setPropertyData(propData: Object):Void {
_readOnly = propData.readOnly;
phone = propData.phone;
zip = new mx.data.types.ZipCode(data.zip);
}
public var name:String;
public var phone:String;
public var zip:ZipCode;
private var _readOnly:Boolean; // indicates if immutable
}