<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://95.179.246.60/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Learn_how_to_use_the_Transcript</id>
	<title>Learn how to use the Transcript - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://95.179.246.60/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Learn_how_to_use_the_Transcript"/>
	<link rel="alternate" type="text/html" href="http://95.179.246.60/mediawiki/index.php?title=Learn_how_to_use_the_Transcript&amp;action=history"/>
	<updated>2026-05-08T12:42:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>http://95.179.246.60/mediawiki/index.php?title=Learn_how_to_use_the_Transcript&amp;diff=53&amp;oldid=prev</id>
		<title>Nmingott: imported material</title>
		<link rel="alternate" type="text/html" href="http://95.179.246.60/mediawiki/index.php?title=Learn_how_to_use_the_Transcript&amp;diff=53&amp;oldid=prev"/>
		<updated>2025-05-03T22:25:37Z</updated>

		<summary type="html">&lt;p&gt;imported material&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
Let&amp;#039;s go step by step:&lt;br /&gt;
&lt;br /&gt;
* What is the most frequent command you ever type in a typical programming language? &amp;#039;&amp;#039;&amp;#039;printf&amp;#039;&amp;#039;&amp;#039; or one of its equivalent like &amp;#039;&amp;#039;&amp;#039;print&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;cout&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;format&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;puts&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;console.log&amp;#039;&amp;#039;&amp;#039; etc. Sure they are. It is the only (canonical) way you can get debug info while your program is running.&lt;br /&gt;
* In Smalltalk, you can survive for a while without the &amp;#039;&amp;#039;&amp;#039;print&amp;#039;&amp;#039;&amp;#039; because Smalltalk lets you live-inspect and modify your objects (data structures) and code, while the code itself is running; often this provides much better view on the data than a brutal &amp;#039;&amp;#039;print&amp;#039;&amp;#039;. But in the end, you will need to print out long strings sooner or later and the inspector/explorer will not help you there.&lt;br /&gt;
* What is the &amp;#039;&amp;#039;&amp;#039;equivalent of print&amp;#039;&amp;#039;&amp;#039; in Cuis-Smalltalk ? Well, you open a &amp;#039;&amp;#039;&amp;#039;Transcript&amp;#039;&amp;#039;&amp;#039; window with WorldClick -&amp;gt; Open -&amp;gt; Transcript, and then, from the Workspace you type:&lt;br /&gt;
&lt;br /&gt;
 Transcript log: &amp;#039;Hello world!&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* and voilà, you get your output in the Transcript window.&lt;br /&gt;
* Now, there are a few &amp;#039;&amp;#039;&amp;#039;problems&amp;#039;&amp;#039;&amp;#039;, try to load some larger text, for example the Wikipedia page for &amp;#039;&amp;#039;&amp;#039;Verona&amp;#039;&amp;#039;&amp;#039; ...&lt;br /&gt;
&lt;br /&gt;
 Feature require: &amp;#039;WebClient&amp;#039;.&lt;br /&gt;
 url _ &amp;#039;&amp;lt;nowiki&amp;gt;https://en.wikipedia.org/wiki/Verona&amp;#039;&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
 Transcript show:  (WebClient httpGet: url) content. &lt;br /&gt;
&lt;br /&gt;
* ... what you see in the Transcript is probably not what you were expecting.&lt;br /&gt;
* Besides the missing &amp;#039;&amp;#039;&amp;#039;wrapping&amp;#039;&amp;#039;&amp;#039;, the Transcript by default also misses &amp;#039;&amp;#039;&amp;#039;history&amp;#039;&amp;#039;&amp;#039; and you can&amp;#039;t &amp;#039;&amp;#039;&amp;#039;copy&amp;#039;&amp;#039;&amp;#039; chunk of text from it. You may not even have &amp;#039;&amp;#039;&amp;#039;newlines&amp;#039;&amp;#039;&amp;#039; represented. Would that be useful?&lt;br /&gt;
* Here is the solution, just RightClick inside the &amp;#039;&amp;#039;Transcript&amp;#039;&amp;#039; and select &amp;#039;&amp;#039;&amp;#039;Workspace with contents&amp;#039;&amp;#039;&amp;#039;. That will open a Window where there is the same text available in the Transcript but the text behaves as you expect: line wrap, history, newlines.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Why&amp;#039;&amp;#039;&amp;#039; then the Transcript behaves this way it does ?&lt;br /&gt;
* Keeping the &amp;#039;&amp;#039;&amp;#039;Transcript&amp;#039;&amp;#039;&amp;#039; and the &amp;#039;&amp;#039;&amp;#039;Workspace - Trscript Contents&amp;#039;&amp;#039;&amp;#039; both open try to run this snippet in your Workspace:&lt;br /&gt;
&lt;br /&gt;
 1 to: 10 do: [ :i | i print. (Delay forSeconds: 0.2) wait ].&lt;br /&gt;
&lt;br /&gt;
* You will notice that in &amp;#039;&amp;#039;&amp;#039;Transcript&amp;#039;&amp;#039;&amp;#039; numbers appear immediately after &amp;#039;&amp;#039;print&amp;#039;&amp;#039; message is sent, in &amp;#039;&amp;#039;&amp;#039;Workspace - Transcript Contents&amp;#039;&amp;#039;&amp;#039; they appear where the whole loop is over. This because &amp;#039;&amp;#039;Workspace - Transcript Contents&amp;#039;&amp;#039; is a &amp;#039;&amp;#039;Morphic&amp;#039;&amp;#039; Window and gets updated only after your snippet execution is over, since your snippet is running in the &amp;#039;&amp;#039;World Morphic&amp;#039;&amp;#039; process. &amp;#039;&amp;#039;&amp;#039;Transcript&amp;#039;&amp;#039;&amp;#039; is not implemented in &amp;#039;&amp;#039;Morphic&amp;#039;&amp;#039; so it can print stuff even when you hanged the whole &amp;#039;&amp;#039;World&amp;#039;&amp;#039;, for any reason. Therefore we can conclude the &amp;#039;&amp;#039;Transcript&amp;#039;&amp;#039; is made to debug stuff but also and preeminently, to be lean, fast and resilient, it does not sport some of the niceties we are used to.&lt;br /&gt;
* There is a way to let Transcript &amp;#039;&amp;#039;&amp;#039;log to a file&amp;#039;&amp;#039;&amp;#039; in your system. As of today 04-dec-2021 you can log to &amp;#039;&amp;#039;&amp;#039;stdout&amp;#039;&amp;#039;&amp;#039; or to a file named &amp;#039;&amp;#039;transcript.txt&amp;#039;&amp;#039;. Here follows the protocol :&lt;br /&gt;
&lt;br /&gt;
 Transcript logsToStdout.              &amp;quot;returns boolean&amp;quot;&lt;br /&gt;
 Transcript logsToStdout: aBoolean.&lt;br /&gt;
 &lt;br /&gt;
 Transcript logsToFile.                &amp;quot;returns boolean&amp;quot;&lt;br /&gt;
 Transcript logsToFile: aBoolean.&lt;br /&gt;
 Transcript filename.                   &amp;quot;=&amp;gt; transcript.txt&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;NOTE.&amp;#039;&amp;#039;&amp;#039; Transcript is quite an interesting Class per se, if you go to read it in the Browser you will see it has zero code in the instance side. All of the behavior is in the class side.&lt;/div&gt;</summary>
		<author><name>Nmingott</name></author>
	</entry>
</feed>