[GOODIE] Transcript Logger (was Re: Logging Transcript to a file)
ned at bike-nomad.com
Thu Jun 20 15:01:30 UTC 2002
On Wednesday 19 June 2002 08:44 am, Markus Fritsche wrote:
> Ned Konz wrote:
> >The Transcript is a Model, so if you add an object as a dependent,
> > it will be notified when the contents change. This could trigger
> > a write to a file.
> >So if you respond to update: of the following aspects:
> To be honest, I have no idea what you mean :-) Could you point to
> place where I could learn to "add an object as a dependant"?
This is the Observer design pattern, in which one object (in this case
the transcript logger) registers itself as a dependent of another
object (in this case the Transcript). When the Transcript flushes its
bytes, it notifies its dependents (any Transcript windows, plus our
transcript logger(s)) of this change by calling #changed: .
The dependents have their method #update: called with a Symbol which
denotes what changed.
Look at the attached change set.
GPG key ID: BEEA7EFE
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1319 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020620/d5924bf6/TranscriptLogging-nk.1.bin
More information about the Squeak-dev