Look into using a data Model.
Populate the Model with a record of data and Bind the data entry fields
to the Model
Then, whenever you want to change the model you can use a change event
to update the Model or not.
The Model becomes your temporary storage.
<mx:Model id ="myModel">
<myField>{myDataProvider.myField}</myField>
</mx:Model>
Then the input field gets populated automatically
<mx:TextInput id="myField" text = {myModel.myField}
change="updateModel(event)" />
//change even will update the original data (Model) based on a condition
private function updateModel(event):void{
var obj = event.currentTarget
if(obj.text == something){
myModel[obj.id] = obj.text
}
}
Ben Marchbanks
::: magazooms :::
digital publishers, taking print beyond paper......
http://www.magazooms.com
Greenville, SC
864.284.9918
Chilcoat, Dee wrote:
I need an example of copying fields in an array to another array, but
I don't want the fields to be pass-by-reference. I'm trying to create
a "holding"array for input in a datagrid. This is code I have used.
holdData[6] =
quickEntryGrid.dataProvider[i].timerecordTrcPayRateAmount;
holdData[7] =
quickEntryGrid.dataProvider[i].timerecordTrcSickLeaveHours;
holdData[8] =
quickEntryGrid.dataProvider[i].timerecordTrcVacationHours;
holdData[9] =
quickEntryGrid.dataProvider[i].timerecordTrcRegularHours;
holdData[10] =
quickEntryGrid.dataProvider[i].timerecordTrcStraightOvertmHours;
holdData[11] =
quickEntryGrid.dataProvider[i].timerecordTrcPremiumOvertmHours;
holdData[12] =
quickEntryGrid.dataProvider[i].timerecordTrcOtherHours;
holdData[13] =
quickEntryGrid.dataProvider[i].timerecordTrcOtherHoursCode;
holdRowData[i] = holdData;
The problem is that whenever a user inputs data into the
quickEntryGrid, it is reflected in the holdRowData, which I need to
contain the original values before the user enters any data. If I
can't use a holding array, do I have other options?
Dee A. Chilcoat
Enterprise Web Application Development
University of California San Diego
[EMAIL PROTECTED]
(858) 534-0719
--
Ben Marchbanks
::: magazooms :::
digital publishers, taking print beyond paper......
http://www.magazooms.com
Greenville, SC
864.284.9918