There is a bug in the code of the "Implementing the Initialize and Dispose Methods" section.
Specifically, the call to $addHandlers in the initialize method should be passing the objects created by using Function.createDelegate (like _onfocusHandler) instead of the function objects themselves (_onFocus).