October 2003
Intermediate to advanced
736 pages
15h 25m
English
Unfortunately, the universe, being very busy and unaccustomed to paying attention to individuals, had managed to replace Peter's boss's delegate with its own. This was an unintended side effect of making the delegate fields public in Peter's Worker class. Likewise, if Peter's boss got impatient, he could decide to fire Peter's delegates himself (which is just the kind of rude thing that Peter's boss was apt to do):
' Peter's boss taking matters into his own hands If Not (peter.completed Is Nothing) Then peter.completed()
Peter wanted to make sure that neither of these could happen. He realized that he needed to add registration and unregistration functions for each delegate so that listeners could add or remove themselves but couldn't ...