ok since i'm not getting any help, i figure I'll post some of my efforts to
hopefully encourage some smart person to help me here....
I googled and googled and found this:
http://livedocs.macromedia.com/flashremoting/mx/Using_Flash_Remoting_MX/UseASDat a6.htm#1181461
Tantalizing hints there. the RecordSet.filter() function is supposed to
return a *copy* of a Recordset.
BUT, there are problems with that as described here:
http://www.flashant.org/index.php?p=21&more=1&c=1 Apparently the filter() function retains references to the original object.
SHAME on Macromedia!
At any rate, it appears as though I can add a RecordSet.copy() method to the
RecordSet object itself by editing the RecordSet.as files in the Macromedia
install directory. I don't know is this will work, and I'm wary of doing
something that would not work on everybody's flash player, but I was thinking I
could add this to the RecordSet.as file right after the filter() prototype.
Does anyone know if that will work??
RecordSet.prototype.copy = function()
{
if (!this.checkLocal()) return;
// create a new, empty RecordSet
var result = new RecordSet(this.mTitles);
// loop over all the records in the current RecordSet
// find the ones that the the filter function approves of,
// and add it to the result
var rcount = this.length;
for(var i = 0; i < rcount; i++)
{
var item = this.getItemAt(i);
//
// RecordSet.as copy() method by sneakyimp
// Copyright (c) 2006
// special thanks to Aral Balkan.
http://www.BitsAndPixels.co.uk //
var copyOfItem = new Object();
for ( var j in item )
{
copyOfItem [ j ] = item [ j ];
}
if ( ( copyOfItem != null ) && ( copyOfItem != 1 ))
{
result.addItem( copyOfItem );
}
}
//trace("RecordSet.filter: " + NetServices.objectToString(result));
return result;
};