[Newbies] Second transcript window?

Blake blake at kingdomrpg.com
Tue Sep 11 18:55:25 UTC 2007

On Tue, 11 Sep 2007 05:38:45 -0700, John Almberg <jalmberg at identry.com>  

> Hi Blake,
> I tried this every which way. I was able to create a new Transcript with  
> the 'make a sibling' halo, but couldn't figure out how to give it it's  
> own name (so it was a separate stream). How do you do this?

Scott Wallace put up this code last night (in case you missed it):

((myTranscript := TranscriptStream new) openAsMorphLabel: 'My Private  
Transcript') openInWorld.

You can now address "myTranscript" separately from Transcript:

myTranscript cr; show: 'hello, private transcript'.
Transcript cr; show: 'hello, system transcript window(s)'.

It is possible to do it using morphs, you just have to get a reference to  
that morph. It doesn't seem to matter if you make a sibling copy or not  
(though I'm sure there are ramifications).

So, what you can do is create the copy, inspect it to find out its  
external name ("Transcript1" in my case) and then pull the  
TranscriptStream out of it:

sw := World submorphNamed: 'Transcript1'.
t := sw model.
t show: 'This now contains your independent transcript stream.'

Obviously, Scott's version is cleaner, but I've been struggling with  
trying to interact with already existing objects since I started playing  
with Morphic.

More information about the Beginners mailing list