Need proxy_flash help

I have a datagrid. I also have a textbox. I have set the textbox’s change event to setup the searchfilter for the arraycollection that is assigned to the datagrid.

So my searchfilter function gets called and each time it is called, it gets an ObjectProxy that represents the row that needs to be evaluated.

In the debugger, I can see all of the fields that I want to look at.

The problem is that these fields will change - they’re dynamic.

So I need a way to get the names of these fields from the objectproxy and subsequently retrieve their values.

I have almost working code for the flash_proxy but where I am stumped is in setting up an array of properties within my class that’s extending the proxy class.

Every single example I’ve seen has an array of properties already set before any of the next* functions are called.

So, would someone please point me to how to get the names of these properties?

G-Man

Here’s the code I have for the class I’m extending Proxy with.

package
{
    import flash.utils.Proxy;
    import flash.utils.flash_proxy;
    import mx.utils.ArrayUtil;
    
    public dynamic class LCProxy extends Proxy {
        protected var _item:Array;
        
        public override function LCProxy(item:Object)
        {
            _item = ArrayUtil.toArray(item);
            
            super();
        }
        override flash_proxy function callProperty(name:*, ... rest):* {
            trace("callProperty", name, rest);
            flash_proxy::isAttribute(name);
            return null;
        }
        
        override flash_proxy function deleteProperty(name:*):Boolean {
            trace("deleteProperty", name);
            flash_proxy::isAttribute(name);
            return false;
        }
        
        override flash_proxy function getDescendants(name:*):* {
            trace("getDescendants", name);
            flash_proxy::isAttribute(name);
            return null;
        }
        
        override flash_proxy function getProperty(name:*):* {
            return _item[name];
        }
        
        override flash_proxy function hasProperty(name:*):Boolean {
            trace("hasProperty", name);
            flash_proxy::isAttribute(name);
            return false;
        }
        
        // Don't override isAttribute(), it is a utility function
        // used by methods that specify a name:* parameter
        // to determine if the name argument was specified as an
        // attribute. It doesn't look like there is any other
        // way to determine if a name was specified as an
        // attribute besides calling Proxy's isAttribute()
        // implementation. 
        override flash_proxy function isAttribute(name:*):Boolean {
            var result:Boolean = super.flash_proxy::isAttribute(name);
            trace("isAttribute", name, result);
            return result;
        }
        
        override flash_proxy function nextName(index:int):String {
            return _item[index-1];
        }
        
        override flash_proxy function nextNameIndex(index:int):int {
            if (index < _item.length)
                return index +1;
            else
                return 0;
        }
        
        override flash_proxy function nextValue(index:int):* {
            var prop:String = _item[index - 1];
            
            return _item[prop];
        }
       
        override flash_proxy function setProperty(name:*, value:*):void {
            trace("setProperty", name, value);
            flash_proxy::isAttribute(name);
        }
    }
}

And the calling function…

private function searchItem(item:ObjectProxy):Boolean
{
    namespace myNamespace = "LCProxy";
    var myProxy:LCProxy = new LCProxy(item.object);
    var strProp:String;
    
    for each (strProp in myProxy) {