I am attempting to create a localization strings ValueObject class that
acts as a proxy to an XML file. The following code below works just as
designed, however everytime I try to bind to it the compiler throws a
warning that the application will not be able to detect changes to said
variable. Is there a way to modify the below class so that:

A) The compiler won't throw these warnings, and
B) the propertyChange event is properly fired?

Michael Krotscheck
Senior Developer
        
RESOURCE INTERACTIVE
www.resource.com

---------------------------------------------------

package
{
        import com.adobe.cairngorm.vo.IValueObject;
        import flash.utils.Proxy;
        import flash.utils.flash_proxy;
        import flash.events.Event;
         
        dynamic public class StringsVO extends Proxy implements
IValueObject
        {
                // Private strings cache
                private var _cache      :Object = new Object();
                
                // Pointer to xml repository
                private var _xml        :XML;
                
                flash_proxy override function getProperty(name:*):*
                {
                        var _name       :String =       String(name);
                        
                        // See if we have it in the cache
                        if(_cache.hasOwnProperty(_name))
                        {
                                return _cache[_name];
                        }
                        
                        // Since we don't have it in the cache, put it
there.
                        if(_xml)
                        {
                                _cache[_name] =
String(_xml.string.(@name == _name)[EMAIL PROTECTED]);
                                return _cache[name];
                                
                                var foo:Event
                        }
                        
                }
                
                public function StringsVO():void
                {
                }
                
                public static function fromXML(xml:XML) :StringsVO
                {
                        var strings:StringsVO = new StringsVO();
                        strings._xml = xml;
                        return strings;
                }
        }
}

Reply via email to