Return to Snippet

Revision: 7706
at August 7, 2008 19:34 by dan_mcweeney


Initial Code
package
{
    import flash.utils.flash_proxy;
    import flash.utils.Proxy;
    import flash.utils.getDefinitionByName;
    import flash.utils.getQualifiedClassName;

    public dynamic class ActiveRecord extends Proxy
    {
        public function ActiveRecord()
        {
            
        }
        flash_proxy override function callProperty(method: *, ...args): * {
            try {          
                var clazz : Class = getDefinitionByName(getQualifiedClassName(this)) as Class;
                return clazz.prototype[method].apply(method, args);
            }
            catch (e : Error) {
                return methodMissing (method, args);
            }
        }
         protected function methodMissing(method : *, args : Array) : Object{
            throw( new Error("Method Missing"));
            return null;
        }
    }
}

Initial URL

                                

Initial Description

                                

Initial Title
ActiveRecord v0.1

Initial Tags

                                

Initial Language
ActionScript 3