Contents of Transcript?
Rick Zaccone
zaccone at bucknell.edu
Sun Feb 20 09:46:27 UTC 2005
>> 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.
I was trying to write an SUnit test that checked for certain text in
the Transcript. This seems more suited to that purpose. Thanks!
Rick
More information about the Squeak-dev
mailing list
|