View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Sp2002 Midterm Review: Changed/Update

Back to Spring 2002 Midterm Review


nextSecond informs the clock that another second has gone by. The clock then calls self changed: #time. This message is sent to all of the dependants to see if they care. clockText would respond to this one and ask the new time which the clock would then return and the clockText would change and update.
Brian Pashel

I think only talking about this problem in the clock example is confusing some people. An update announcement doesn't necessarily have to make the dependant ask for information. When an change happens and the event is announced to all the dependants, those dependants decide what message to perform. I think it's summed up kind of nicely as

Change - Announce - Update - Perform

1. When Clock's time increments by a second, Clock knows there is a change.
2. Because something important has changed, Clock must then announce an event to all its dependants.
3. This announcement goes to the dependant's in form of an update message.
4. If a dependant is set to update when that event has occurred then it must perform whatever message is associated with that event.

Hank Wilde

Link to this Page