Is there a reason for object functions to be unset or deleted or simply not applied for any reason at all that isn't intentional?
I am maintaining someone elses code and gone through it many times. I use Google Chromes awesome debuger and also TextMate. These help me find the origin of error relatively fast.
The problem I have now is that i have an object: types. This object conatains...types. And these types have functions and other variables attached to them.
For some reason in the middle of the code, this type has been passed by reference millions of times probably. When it comes to a certain part of the code parts of it, seem to have dissapeared. Puff! And it's gone..!
Anyone have a clue (other than it being removed somewhere else earlier in the code, I'm already looking for that)
Example
Right now I am simply adding the functions on the fly. Not liking it though, feel a little out of control of the code:
if(identifier.kind.hasOwnProperty('getWarning')) {
identifier.kind.getWarning = CLEANROOM.types[kind].getWarning;
}