TranscriptStream questions

Dan Ingalls Dan at SqueakLand.org
Wed Sep 12 04:03:28 UTC 2001


"Ken G. Brown" <kbrown at tnc.com>  wrote...

>TranscriptStream seems to be able to do what I want for displaying a growing text stream from a serial port. However there are a few things I don't understand.
>----
>This snippet works as I would like but how do I change the title?
>
>myTranscript _ Transcript open.
>myTranscript show: 'This text shows.'
>----
>This snippet opens a transcript window titled 'My Transcript' but the show:
>message does not work.
>
>myTranscript _ (TranscriptStream new openAsMorphLabel: 'My Transcript') openInWorld.
>myTranscript show: 'my text'. "gets message not understood - show:"
>
>What do I do in place of show: which would give the same results of adding to the bottom of the existing text?

Yoy need to pay attention to the error -- a SystemWindow was unable to understand #show:, not a TranscriptStream.

You needed instead the followindg couplet:

((myTranscript _ TranscriptStream new) openAsMorphLabel: 'My Transcript') openInWorld.
myTranscript show: 'my text'. "works just fine"

>Is it ok to use TranscriptStream in this way or are there negative implications? Eventually I might want to have several TranscriptStreams within a window. Is it possible? Or should I be using PluggableTextMorphs (or some other). If so, how do I get the PluggabletextMorph to act like the TranscriptStream with the equivalent of the show: message?

What you are doing is fine -- you can make thousands of them.

	- Dan
-- 




More information about the Squeak-dev mailing list