简体   繁体   中英

how to use object proxy in flex?

hi here is some code that i have to read & understood so can anybody explain me what object proxy does and whats benefit because just formatting it?

  override public function set currentResult(value:ArrayCollection):void
    {
        super.currentResult = value;
        dispatch(new doEvent(getFormatData(value)));
    }

    private static function getFormat(ddList:ArrayCollection):ArrayCollection
    {
        var formattedArr:ArrayCollection = new ArrayCollection();
        for each(var obj:Object in ddList)
            formattedArr.addItem(new ObjectProxy(obj));

        return formattedArr;
    }

ObjectProxy provides the ability to track changes to an item managed by this proxy. Any number of objects can "listen" for changes on this object, by using the addEventListener() method.use this to more clear.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM