Hi, I'm trying to create a ObjectUtil.as Core class with the following
method borrowed from Flex SDK:

/**
         * Convert the object to a string of form: PROP: VAL&PROP: VAL
where: PROP is a property VAL is its corresponding value & is the specified
optional delimiter
         * @param obj Object to convert
         * @param delimiter (optional) Delimiter of property/value pairs
         * @return An string of all property/value pairs delimited by the
given string or null if the input object or delimiter is null.
         */
        public static function toString( obj:Object=null, delimiter:String
= "\n" ):String
        {
            if ( obj == null || delimiter == null )
            {
                return "";
            }
            else
            {
                var ret:Array = [];

                for ( var s:Object in obj )
                {
                    ret.push( s + ": " + obj[s] );
                }

                return ret.join( delimiter );
            }
        }


when I try to use it in a SWC library it fails with this error:

Incorrect number of arguments.  Expected no more than 0
           var str:String = ObjectUtil.toString(value);
                            ^

I'm trying to see where is the problem without luck

Some idea of what is going wrong here?

Thanks


-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to