?> Do you think there is a easy way around to get around the situation and 
achieve what I am trying to do ?

AFAIK, there's no way inside the function to know of (or change) all the 
possible external references to some object, and therefore make them all point 
to something else. 

For better or worse, this is one reason why globals are sometimes used/useful, 
because you *can* change a global and then any/all code which refers to that 
same global will automatically "see" the change.

So:

function mutate(){
   a = function() { ... };
}

var a = {};
mutate();
a(); // will work!


--Kyle

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to