Hi,
and nowhere near complete:). But it might suffice for most cases.
greetz
JC
On Thu, Jul 17, 2008 at 8:24 AM, Leonardo Scattola - New Vision srl <
[EMAIL PROTECTED]> wrote:
> Thanks everybody for your prompt response.
>
> A dude on the FlashMedia List (on which we crossposted) proposed this
> solution:
>
> setFunctionNames = function (pObjContainer) {
> // Description:
> // Sets the property "name" for every Function
> // that was found in "pObjContainer"
> // Arguments:
> // pObjContainer -> Obj|Mc in which to recursively
> // search for functions
> pObjContainer = pObjContainer || _root;
> for (var p in pObjContainer) {
> if (typeof pObjContainer[p] == 'object') {
> arguments.callee(pObjContainer[p]);
> } else if (typeof pObjContainer[p] == 'function') {
> pObjContainer[p].name = p; // <-- sets the name
> arguments.callee(pObjContainer[p].prototype);
> }
> }
> }
>
> Quick, swift and efficient.
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders