Contents of Transcript?
David T. Lewis
lewis at mail.msen.com
Sat Feb 19 15:30:43 UTC 2005
On Thu, Feb 17, 2005 at 04:29:34PM -0500, Rick Zaccone wrote:
> I would like to capture the contents of the Transcript in a string.
> How do I do this? Its "collection" instance variable has the first
> line of text, but not the remainder.
See Ned's reply for the right way to do it, but if you just want to grab
the contents of Transcript windows that are already open, you can do:
(Transcript
dependents select: [:dep | dep isKindOf: PluggableTextMorph]
thenCollect: [:tm | tm text asString]) asArray
This gives you the contents of any currently opened Transcript windows
in your current (Morphic) project. The open windows are views onto the
transcript model, and each view can display more text than is maintained
in the model itself.
Dave
More information about the Squeak-dev
mailing list
|