DataSet.calcFields

Availability

Flash Player 7.

Edition

Flash MX Professional 2004.

Usage

Usage 1:

var listenerObject:Object = new Object();
listenerObject.calcFields = function (eventObj:Object):Void {
    // ...
};
dataSetInstance.addEventListener("calcFields", listenerObject);

Usage 2:

on (calcFields) {
    // ...
}

Description

Event; generated when values of calculated fields for the current item in the collection need to be determined. A calculated field is one whose Kind property is set to Calculated on the Schema tab of the Component inspector. The calcFields event listener that you create should perform the required calculation and set the value for the calculated field.

This event is also called when the value of a noncalculated field (that is, a field with its Kind property set to Data on the Schema tab) is updated.

CAUTION

 

Do not change the values of any of noncalculated fields in this event, because this results in an "infinite loop." Set only the values of calculated fields within the calcFields event.


Flash CS3