ActionScript 2.0 Components Language Reference |
|
|
|
| TransferObject interface > TransferObject.setPropertyData() | |||
Flash Player 7.
Flash MX 2004.
class yourClass implements TransferObject {
function setPropertyData(propData) {
// Your code here.
}
}
propData An object that contains the data assigned to this transfer object.
Nothing.
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.
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
}
|
|
|
|