.addBuddy is defined on objects that are constructed from the BuddyList constructor.
You can not call a method of an object like you are trying to do.
You might want to create it as a "static" function
BuddyList.addBuddy = function(buddyName) { ... }
You can then call it from the prototype aswell
BuddyList.prototype.addBuddy = function(buddyName) {
BuddyList.addBuddy.apply(this, arguments)
}
You would need to check for any references to a BuddyList object inside the addBuddy function though.
Remember BuddyList is an object constructor. Calling the addBuddy method on the constructor doesn't make sense. I think you actaully want to do this
buddyList = new BuddyList;
buddyList.append(someBuddy);
In theory if there's only ever one BuddyList then you may want to look for
BuddyList = new BuddyList;
That will overwrite your constructor with an object inherited from the constructor.
You can always call the addBuddy method directly without an object through the prototype as follows:
BuddyList.prototype.addBudy.call(this, someBuddy)
It really depends on what your trying to do.