Hi, I am using an object written by someone else that was built like
I thought I could doCode:MyObject = { MyMethod : function() {}, ... }
but it doesn't work. Can anyone explain why, suggest a way to achieve this? The original MyMethod is called in many other places so I just want to override it and let it rip.Code:MyObject.OldMethod = MyObject.MyMethod; MyObject.MyMethod = function() { MyObject.OldMethod(); newstuff; };
Thanks!!


Reply With Quote
Bookmarks