Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
hilaire committed Jun 1, 2024
1 parent 4660392 commit 3559b5a
Show file tree
Hide file tree
Showing 313 changed files with 3,605 additions and 3,489 deletions.
10 changes: 5 additions & 5 deletions bookSettings.texinfo
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ H. Fernandes with K. Dickey & J. Vuletich


@macro thanks
Thanks to Matt Armstrong, Ezequiel Birman, Szabolcs Komáromi, David
Lewis, John McGarey, Mariano Montone, Ricardo Pacheco, Barry Perryman,
Tommy Pettersson, Bernhard Pieber, Mauro Rizzi, Stephen Smith & Ignacio
Sniechowski for the reviews of the book, suggestions and borrowed
texts. Your help is very valuable.
Thanks to Matt Armstrong, Ezequiel Birman, Michael Khol, Szabolcs
Komáromi, David Lewis, John McGarey, Mariano Montone, Ricardo Pacheco,
Barry Perryman, Tommy Pettersson, Bernhard Pieber, Mauro Rizzi,
Stephen Smith & Ignacio Sniechowski for the reviews of the book,
suggestions and borrowed texts. Your help is very valuable.
@end macro

@macro vm
Expand Down
35 changes: 15 additions & 20 deletions docs/A-Clock-Morph.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.0.3, https://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This book is for Cuis-Smalltalk (6.0#5608 or later), a free and modern
Expand All @@ -9,15 +9,15 @@
Copyright © 2020, 2021, 2022, 2023, 2024 H. Fernandes with K. Dickey & J. Vuletich
Thanks to Matt Armstrong, Ezequiel Birman, Szabolcs Komáromi, David
Lewis, John McGarey, Mariano Montone, Ricardo Pacheco, Barry Perryman,
Tommy Pettersson, Bernhard Pieber, Mauro Rizzi, Stephen Smith & Ignacio
Sniechowski for the reviews of the book, suggestions and borrowed
texts. Your help is very valuable.
Thanks to Matt Armstrong, Ezequiel Birman, Michael Khol, Szabolcs
Komáromi, David Lewis, John McGarey, Mariano Montone, Ricardo Pacheco,
Barry Perryman, Tommy Pettersson, Bernhard Pieber, Mauro Rizzi,
Stephen Smith & Ignacio Sniechowski for the reviews of the book,
suggestions and borrowed texts. Your help is very valuable.
Compilation : January 31, 2024
Compilation : June 1, 2024
Documentation source: https://github.com/Cuis-Smalltalk/TheCuisBook
Expand Down Expand Up @@ -66,9 +66,11 @@
<link href="Going-Vector.html" rel="prev" title="Going Vector">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
blockquote.indentedblock {margin-right: 0em}
div.center {text-align:center}
div.example {margin-left: 3.2em}
span:hover a.copiable-link {visibility: visible}
-->
</style>
<link rel="stylesheet" type="text/css" href="style.css">
Expand All @@ -83,16 +85,15 @@
Next: <a href="Back-to-Spacewar_0021-Morphs.html" accesskey="n" rel="next">Back to Spacewar! Morphs</a>, Previous: <a href="Going-Vector.html" accesskey="p" rel="prev">Going Vector</a>, Up: <a href="The-Fundamentals-of-Morph.html" accesskey="u" rel="up">The Fundamentals of Morph</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h3 class="section" id="A-Clock-Morph-1">7.2 A Clock Morph</h3>
<h3 class="section" id="A-Clock-Morph-1"><span>7.2 A Clock Morph<a class="copiable-link" href="#A-Clock-Morph-1"> &para;</a></span></h3>
<p>With all the things we have already learned, we can build a more
sophisticated morph. Let&rsquo;s build a <code class="code">ClockMorph</code> as see in
<a class="ref" href="#ch07_002d05_002dClock">Figure 7.5</a>.
</p>

<div class="float" id="ch07_002d05_002dClock">
<div class="center"><img class="image" src="ch07-05-Clock.png" alt="ch07-05-Clock">
</div>
<div class="caption"><p><strong class="strong">Figure 7.5: </strong>A clock morph</p></div></div>
</div><div class="caption"><p><strong class="strong">Figure 7.5: </strong>A clock morph</p></div></div>
<p>Let&rsquo;s create <code class="code">ClockMorph</code>, the dial clock :
</p>
<div class="example smallexample">
Expand All @@ -103,7 +104,7 @@ <h3 class="section" id="A-Clock-Morph-1">7.2 A Clock Morph</h3>
category: 'Morphic-Learning'
</pre></div>

<a class="index-entry-id" id="index-morph-21"></a>
<a class="index-entry-id" id="index-morph-drawOn_003a-2"></a>
<p>...and its drawing method in the category <code class="command">drawing</code>:
</p>
<div class="float" id="clockDialDrawing">
Expand All @@ -120,7 +121,6 @@ <h3 class="section" id="A-Clock-Morph-1">7.2 A Clock Morph</h3>
aCanvas drawString: 'VI' at: -11 @ 70 font: nil color: Color brown.
aCanvas drawString: 'IX' at: -90 @ -10 font: nil color: Color brown
</pre></div>

<div class="caption"><p><strong class="strong">Example 7.2: </strong>Drawing the clock dial</p></div></div>

<p>We create <code class="code">ClockHourHandMorph</code>, the hand for the hours:
Expand Down Expand Up @@ -222,14 +222,12 @@ <h3 class="section" id="A-Clock-Morph-1">7.2 A Clock Morph</h3>

<div class="float" id="ch07_002d07_002dClockMorph_002dinitialize">
<div class="center"><img class="image" src="ch07-07-ClockMorph-initialize.png" alt="ch07-07-ClockMorph-initialize">
</div>
<div class="caption"><p><strong class="strong">Figure 7.6: </strong>Declaring unknown variables as instance variables in current class</p></div></div>
</div><div class="caption"><p><strong class="strong">Figure 7.6: </strong>Declaring unknown variables as instance variables in current class</p></div></div>
<p>Your <code class="code">ClockMorph</code> class definition should now be complete!
</p>
<div class="float" id="ch07_002d08_002dClockMorph_002divars_002dadded">
<div class="center"><img class="image" src="ch07-08-ClockMorph-ivars-added.png" alt="ch07-08-ClockMorph-ivars-added">
</div>
<div class="caption"><p><strong class="strong">Figure 7.7: </strong><code class="code">ClockMorph</code> with instance variables added</p></div></div>
</div><div class="caption"><p><strong class="strong">Figure 7.7: </strong><code class="code">ClockMorph</code> with instance variables added</p></div></div>
<p>Finally, we animate our clock. In method category <code class="command">stepping</code> add the
method:
</p>
Expand Down Expand Up @@ -277,8 +275,7 @@ <h3 class="section" id="A-Clock-Morph-1">7.2 A Clock Morph</h3>
</p>
<div class="float" id="ch07_002d06_002dExerciseClock">
<div class="center"><img class="image" src="ch07-06-ExerciseClock.png" alt="ch07-06-ExerciseClock">
</div>
<div class="caption"><p><strong class="strong">Figure 7.8: </strong>A fancy clock morph</p></div></div>
</div><div class="caption"><p><strong class="strong">Figure 7.8: </strong>A fancy clock morph</p></div></div>
<div class="float" id="exeFancyClock">
<blockquote class="indentedblock">
<p>&nbsp;<img class="image" src="CuisLogo.png" alt="CuisLogo">
Expand All @@ -287,8 +284,6 @@ <h3 class="section" id="A-Clock-Morph-1">7.2 A Clock Morph</h3>
decorated with a red and yellow disc is fancy? How will you modify our
clock morph to get this result?</em>
</p></blockquote>


<div class="caption"><p><strong class="strong">Exercise 7.3: </strong>A fancy clock</p></div></div>
<p>Create some instances of your clock: <code class="code">ClockMorph new
openInWorld</code>. You can rotate and zoom. Look at the visual quality of
Expand Down
47 changes: 20 additions & 27 deletions docs/A-brief-introduction-to-Inspectors.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.0.3, https://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This book is for Cuis-Smalltalk (6.0#5608 or later), a free and modern
Expand All @@ -9,15 +9,15 @@
Copyright © 2020, 2021, 2022, 2023, 2024 H. Fernandes with K. Dickey & J. Vuletich
Thanks to Matt Armstrong, Ezequiel Birman, Szabolcs Komáromi, David
Lewis, John McGarey, Mariano Montone, Ricardo Pacheco, Barry Perryman,
Tommy Pettersson, Bernhard Pieber, Mauro Rizzi, Stephen Smith & Ignacio
Sniechowski for the reviews of the book, suggestions and borrowed
texts. Your help is very valuable.
Thanks to Matt Armstrong, Ezequiel Birman, Michael Khol, Szabolcs
Komáromi, David Lewis, John McGarey, Mariano Montone, Ricardo Pacheco,
Barry Perryman, Tommy Pettersson, Bernhard Pieber, Mauro Rizzi,
Stephen Smith & Ignacio Sniechowski for the reviews of the book,
suggestions and borrowed texts. Your help is very valuable.
Compilation : January 31, 2024
Compilation : June 1, 2024
Documentation source: https://github.com/Cuis-Smalltalk/TheCuisBook
Expand Down Expand Up @@ -66,9 +66,11 @@
<link href="Submorph.html" rel="prev" title="Submorph">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
div.center {text-align:center}
div.example {margin-left: 3.2em}
kbd.kbd {font-style: oblique}
span:hover a.copiable-link {visibility: visible}
-->
</style>
<link rel="stylesheet" type="text/css" href="style.css">
Expand All @@ -83,27 +85,25 @@
Next: <a href="Building-your-specialized-Morph.html" accesskey="n" rel="next">Building your specialized Morph</a>, Previous: <a href="Submorph.html" accesskey="p" rel="prev">Submorph</a>, Up: <a href="Visual-with-Morph.html" accesskey="u" rel="up">Visual with Morph</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h3 class="section" id="A-brief-introduction-to-Inspectors-1">6.4 A brief introduction to Inspectors</h3>
<h3 class="section" id="A-brief-introduction-to-Inspectors-1"><span>6.4 A brief introduction to Inspectors<a class="copiable-link" href="#A-brief-introduction-to-Inspectors-1"> &para;</a></span></h3>
<p>To get the construction halo for an interior morph, just
<kbd class="kbd">Middle-Click</kbd> multiple times to &ldquo;drill down&rdquo; through the
submorph hierarchy.
</p>
<div class="float" id="ch06_002d07_002dMiddleClickRect">
<div class="center"><img class="image" src="ch06-07-MiddleClickRect.png" alt="ch06-07-MiddleClickRect">
</div>
<div class="caption"><p><strong class="strong">Figure 6.6: </strong>Middle-Click for construction
</div><div class="caption"><p><strong class="strong">Figure 6.6: </strong>Middle-Click for construction
handles</p></div></div>
<div class="float" id="ch06_002d08_002d2ndMidClckToSubmorph">
<div class="center"><img class="image" src="ch06-08-2ndMidClckToSubmorph.png" alt="ch06-08-2ndMidClckToSubmorph">
</div>
<div class="caption"><p><strong class="strong">Figure 6.7: </strong>Middle-Click again to descend into
</div><div class="caption"><p><strong class="strong">Figure 6.7: </strong>Middle-Click again to descend into
submorphs</p></div></div>
<p>There is an orange handle on the right, just under the green
<code class="command">Duplicate</code> handle. <kbd class="kbd">Left-Click</kbd> this to get the
<code class="command">Debug</code> menu. Use this menu to get an <em class="dfn">Inspector</em> for the
rect.
</p>
<a class="index-entry-id" id="index-tools-3"></a>
<a class="index-entry-id" id="index-tools-inspector"></a>
<p>Observe <a class="ref" href="#ch06_002d11aColorClickOnRect">Figure 6.8</a>, on the left we have a pane for
self, all inst vars, and the individual instance variables. Clicking
to select &ldquo;all inst vars&rdquo; and the values pane on the right shows
Expand All @@ -117,13 +117,12 @@ <h3 class="section" id="A-brief-introduction-to-Inspectors-1">6.4 A brief introd
</p>
<div class="float" id="ch06_002d11aColorClickOnRect">
<div class="center"><img class="image" src="ch06-11aColorClickOnRect.png" alt="ch06-11aColorClickOnRect">
</div>
<div class="caption"><p><strong class="strong">Figure 6.8: </strong>Add instance specific behavior</p></div></div>
</div><div class="caption"><p><strong class="strong">Figure 6.8: </strong>Add instance specific behavior</p></div></div>
<p>To add a behavior to all instances of a class, we create an instance
method. Here we are going to create a behavior for &ldquo;just this one
<code class="code">BoxedMorph</code> instance&rdquo;.
</p>
<a class="anchor" id="morphProperties"></a><a class="index-entry-id" id="index-morph-4"></a>
<a class="anchor" id="morphProperties"></a><a class="index-entry-id" id="index-morph-properties"></a>
<p>In addition to instance variables, a morph can have any number of
named <em class="dfn">properties</em> which can be different for each morph.
</p>
Expand All @@ -135,7 +134,6 @@ <h3 class="section" id="A-brief-introduction-to-Inspectors-1">6.4 A brief introd
self setProperty: #mouseButton1Up:localPosition:
toValue: [:ignoredEvent :ignoredPosition| self color: Color random]
</pre></div>

<div class="caption"><p><strong class="strong">Example 6.1: </strong>Edit the behavior of this morph from its Inspector</p></div></div>
<p>These properties are special to the user interface. You can find
methods with these names in the <code class="code">Morph</code> class to see what they
Expand All @@ -148,26 +146,23 @@ <h3 class="section" id="A-brief-introduction-to-Inspectors-1">6.4 A brief introd
rect, because the rect now takes the mouse event. You have to
mouse-down on the ellipse. More on this below.
</p>
<a class="index-entry-id" id="index-morph-5"></a>
<a class="index-entry-id" id="index-morph-move_002fpick-up"></a>
<p>One quick note on <code class="command">Move</code> versus <code class="command">Pick up</code>. <code class="command">Move</code>
moves a submorph &ldquo;within&rdquo; its parent. <code class="command">Pick up</code> grabs a morph
&ldquo;out&rdquo; of its parent.
</p>
<div class="float" id="ch06_002d09_002dMove_002dWithin">
<div class="center"><img class="image" src="ch06-09-Move-Within.png" alt="ch06-09-Move-Within">
</div>
<div class="caption"><p><strong class="strong">Figure 6.9: </strong>Move submorph within its parent</p></div></div>
</div><div class="caption"><p><strong class="strong">Figure 6.9: </strong>Move submorph within its parent</p></div></div>
<div class="float" id="ch06_002d10_002dPickUp_002d2_002dMoveOut">
<div class="center"><img class="image" src="ch06-10-PickUp-2-MoveOut.png" alt="ch06-10-PickUp-2-MoveOut">
</div>
<div class="caption"><p><strong class="strong">Figure 6.10: </strong>Pick a submorph out of its parent</p></div></div>
</div><div class="caption"><p><strong class="strong">Figure 6.10: </strong>Pick a submorph out of its parent</p></div></div>
<p>Before we go on, let&rsquo;s use an inspector on the ellipse to change
values of a couple of its instance variables.
</p>
<div class="float" id="ch06_002d12_002dInspectEllipse">
<div class="center"><img class="image" src="ch06-12-InspectEllipse.png" alt="ch06-12-InspectEllipse">
</div>
<div class="caption"><p><strong class="strong">Figure 6.11: </strong>Inspect instance variables of the ellipse</p></div></div>
</div><div class="caption"><p><strong class="strong">Figure 6.11: </strong>Inspect instance variables of the ellipse</p></div></div>
<p>Observe <a class="ref" href="#ch06_002d14_002dSetBorderColor">Figure 6.12</a> and <a class="ref" href="#editShapeInspector">Example 6.2</a>. In
the lower pane of the inspector, code can be executed in the context
of the inspected object. <code class="code">self</code> refers to the instance. Here
Expand All @@ -178,12 +173,10 @@ <h3 class="section" id="A-brief-introduction-to-Inspectors-1">6.4 A brief introd
<pre class="example-preformatted">self borderWidth: 10.
self borderColor: Color blue
</pre></div>

<div class="caption"><p><strong class="strong">Example 6.2: </strong>Edit the state of this ellipse from its Inspector</p></div></div>
<div class="float" id="ch06_002d14_002dSetBorderColor">
<div class="center"><img class="image" src="ch06-14-SetBorderColor.png" alt="ch06-14-SetBorderColor">
</div>
<div class="caption"><p><strong class="strong">Figure 6.12: </strong>Use Inspector to set border color and
</div><div class="caption"><p><strong class="strong">Figure 6.12: </strong>Use Inspector to set border color and
border width</p></div></div>
<p>In the typical case one wants to refine or change behaviors for all
instances of a class.
Expand Down
Loading

0 comments on commit 3559b5a

Please sign in to comment.