From 3559b5acdce6bd1170d907208659bef261f2a19f Mon Sep 17 00:00:00 2001 From: hilaire Date: Sat, 1 Jun 2024 08:23:20 +0200 Subject: [PATCH] Typo --- bookSettings.texinfo | 10 +- docs/A-Clock-Morph.html | 35 +- docs/A-brief-introduction-to-Inspectors.html | 47 +- ...ef-introduction-to-the-system-Browser.html | 49 +- docs/Back-to-Spacewar_0021-Morphs.html | 91 +- docs/Beginnings.html | 18 +- docs/Block-syntax.html | 32 +- docs/Building-your-specialized-Morph.html | 27 +- ..._002d-Model-of-Communicating-Entities.html | 22 +- ...nicating-Entities-_0028Solutions_0029.html | 46 +- docs/Code-Management-_0028Solutions_0029.html | 20 +- docs/Code-Management.html | 18 +- docs/Collections-detailed.html | 88 +- docs/Communicating-entities.html | 28 +- ...ol-Flow-Messaging-_0028Solutions_0029.html | 30 +- docs/Control-Flow-Messaging.html | 18 +- docs/Control-flow-with-block-and-message.html | 33 +- docs/Cuis-system-classes.html | 22 +- docs/Daily-Workflow.html | 27 +- docs/Debug-and-Exception-Handling.html | 18 +- docs/Documents-Copyright.html | 24 +- docs/E_002dexeRectMorph.html | 14 +- docs/E_002dimg1.html | 14 +- docs/Ellipse-Morph.html | 31 +- docs/Events-_0028Solutions_0029.html | 33 +- docs/Events.html | 20 +- docs/Explore-OOP-from-the-Browser.html | 43 +- docs/FloatPrecision.html | 14 +- docs/FractionPrecision.html | 14 +- docs/Fun-with-collections.html | 126 ++- docs/Fun-with-variables.html | 34 +- docs/Going-Vector.html | 73 +- docs/Golden-Rules-of-the-Smalltalk-Guild.html | 18 +- docs/Halt_0021.html | 27 +- docs/Historical-Context.html | 18 +- docs/Indexes.html | 775 +++++++++--------- docs/Inspecting-the-Unexpected.html | 25 +- docs/Installing-a-Package.html | 20 +- ...ng-and-configuring-Cuis_002dSmalltalk.html | 32 +- docs/Kernel_002dNumbers.html | 84 +- docs/Kernel_002dText.html | 33 +- docs/Message-send-definitions.html | 45 +- docs/Message-to-string-entities.html | 46 +- docs/Messages-to-number-entities.html | 48 +- docs/Method-syntax.html | 21 +- docs/Overall-Mechanism.html | 22 +- docs/Preface-_0028Solutions_0029.html | 20 +- docs/Preface.html | 34 +- docs/Pseudo_002dvariables.html | 30 +- .../Refactoring-to-Improve-Understanding.html | 38 +- docs/Sharing-Cuis.html | 18 +- ...lltalk-Philosophy-_0028Solutions_0029.html | 29 +- docs/Solutions-to-the-Exercises.html | 18 +- docs/Source-Code-File.html | 22 +- docs/SpaceWar_0021-collections.html | 67 +- docs/Spacewar_0021-Events.html | 55 +- docs/Spacewar_0021-Morphs.html | 36 +- docs/Spacewar_0021-Source-Code.html | 18 +- docs/Spacewar_0021-States-and-Behaviors.html | 122 ++- docs/Spacewar_0021-models.html | 53 +- docs/Spacewar_0021-package.html | 14 +- docs/Spacewar_0021.html | 24 +- docs/Spacewar_0021_0027s-methods.html | 41 +- ...ng-_002d_002d-a-particular-collection.html | 50 +- docs/Submorph.html | 28 +- docs/Summary-of-Syntax.html | 46 +- docs/Syntactic-elements.html | 18 +- docs/System-Events.html | 20 +- docs/The-Change-Log.html | 28 +- docs/The-Change-Set.html | 31 +- ...ction-Way-of-Life-_0028Solutions_0029.html | 54 +- docs/The-Collection-Way-of-Life.html | 22 +- docs/The-Debugger.html | 35 +- docs/The-Examples.html | 22 +- docs/The-Exercises.html | 20 +- docs/The-Figures.html | 18 +- ...amentals-of-Morph-_0028Solutions_0029.html | 39 +- docs/The-Fundamentals-of-Morph.html | 20 +- docs/The-Image.html | 18 +- ...ssage-Way-of-Life-_0028Solutions_0029.html | 24 +- docs/The-Message-Way-of-Life.html | 18 +- docs/The-Package.html | 52 +- ...rstanding-Object-Oriented-Programming.html | 59 +- ...Visual-with-Morph-_0028Solutions_0029.html | 22 +- docs/Visual-with-Morph.html | 18 +- docs/Writing-your-first-scripts.html | 60 +- docs/accurateCollisionShipsSun.html | 14 +- docs/accuratePixelCollisionShipsSun.html | 14 +- docs/addAfter.html | 14 +- docs/allActorsMorph.html | 14 +- docs/alphabetCipher.html | 14 +- docs/apples12.html | 14 +- docs/askingClass.html | 14 +- docs/blockDivisor.html | 14 +- docs/boundMorph.html | 14 +- docs/breakpoint.html | 14 +- docs/capWordNumber.html | 14 +- docs/categorizeControls.html | 14 +- docs/categorizeTeleport.html | 14 +- docs/centralStarDraw.html | 14 +- docs/centralStarExtent.html | 14 +- docs/ch00_002dimg1.html | 14 +- docs/ch01_002dPreferences.html | 14 +- docs/ch01_002dSpacewarGameplay.html | 14 +- docs/ch01_002dSpacewarPDP.html | 14 +- docs/ch01_002dimg1a.html | 14 +- docs/ch01_002dimg2.html | 14 +- docs/ch02_002dInstalledPackages.html | 14 +- docs/ch02_002dbrowserDetailed.html | 14 +- docs/ch02_002dspacewarClassCategory.html | 14 +- docs/ch03_002dbrowseHierarchy.html | 14 +- docs/ch03_002dbrowseProtocol.html | 14 +- docs/ch03_002dfloatClassSide.html | 14 +- docs/ch03_002dfloatInstanceSide.html | 14 +- docs/ch05_002dSpacewarGamePlay.html | 14 +- .../ch06_002d01_002dEllipseMorphFromMenu.html | 14 +- docs/ch06_002d03_002dDragToEnlarge.html | 14 +- docs/ch06_002d04_002dEnlarged.html | 14 +- docs/ch06_002d05_002dAddRectangle.html | 14 +- .../ch06_002d06_002dEmbedRectIntoEllipse.html | 14 +- docs/ch06_002d07_002dMiddleClickRect.html | 14 +- .../ch06_002d08_002d2ndMidClckToSubmorph.html | 14 +- docs/ch06_002d09_002dMove_002dWithin.html | 14 +- ...6_002d10_002dPickUp_002d2_002dMoveOut.html | 14 +- docs/ch06_002d11aColorClickOnRect.html | 14 +- docs/ch06_002d12_002dInspectEllipse.html | 14 +- docs/ch06_002d14_002dSetBorderColor.html | 14 +- docs/ch06_002d15_002dColorClickEllipse.html | 14 +- ...6_002d20_002dTorpedoUpdateInheritance.html | 14 +- docs/ch07_002d01_002dLineDetails.html | 14 +- docs/ch07_002d02_002dTriangles.html | 14 +- docs/ch07_002d03_002dAnimatedMorph.html | 14 +- ...002d04_002dAnimatedAndClippedSubmorph.html | 14 +- docs/ch07_002d05_002dClock.html | 14 +- docs/ch07_002d06_002dExerciseClock.html | 14 +- ..._002d07_002dClockMorph_002dinitialize.html | 14 +- ...08_002dClockMorph_002divars_002dadded.html | 14 +- docs/ch07_002d09_002dfluctuatingStar.html | 14 +- docs/ch07_002d10_002dShipDiagram.html | 14 +- docs/ch07_002d11_002dTorpedoDiagram.html | 14 +- docs/ch07_002d12_002dbrowserClassSide.html | 14 +- docs/ch07_002d13_002dshipDisplayBounds.html | 14 +- docs/ch08_002dFocus.html | 14 +- docs/ch10_002d01_002dZeroDivide.html | 14 +- docs/ch10_002d02_002dDirChildNames.html | 14 +- docs/ch10_002d03_002dDebugIt.html | 14 +- docs/ch10_002d04_002dStepInto.html | 14 +- docs/ch10_002d05_002dFocusObjAndArgs.html | 14 +- docs/ch10_002d06_002dHalt.html | 14 +- docs/ch10_002d07_002dOver.html | 14 +- docs/ch10_002dAdd_002dRequirement.html | 14 +- docs/ch10_002dBrowsePackageChange.html | 14 +- docs/ch10_002dChangeList.html | 14 +- docs/ch10_002dChangeSet1.html | 14 +- docs/ch10_002dChangeSet2.html | 14 +- docs/ch10_002dChangeSetToCore.html | 14 +- docs/ch10_002dFileListChangeSet.html | 14 +- docs/ch10_002dImageSetUp.html | 14 +- ...2dNewPackage_002dMorphic_002dLearning.html | 14 +- ..._002dPackage_002dwith_002drequirement.html | 14 +- docs/ch10_002dRecoverLostChanges1.html | 14 +- docs/ch10_002dRecoverLostChanges2.html | 14 +- ...10_002dSaved_002dwith_002drequirement.html | 14 +- docs/ch11_002d01_002dSendersOfLeft.html | 14 +- docs/ch11_002d02_002dRenameLeft.html | 14 +- docs/ch11_002d03_002dRenameInCategory.html | 14 +- docs/ch11_002d04_002dturnLeft.html | 14 +- docs/ch11_002d05_002dnoseSenders.html | 14 +- docs/ch11_002d06_002dnoseDirection.html | 14 +- docs/changeSetContents.html | 14 +- docs/childNames.html | 14 +- docs/classInstanceVar.html | 14 +- docs/classVariableMobile.html | 14 +- docs/classesCount.html | 14 +- docs/clockDialDrawing.html | 14 +- docs/collFirst.html | 14 +- docs/collectionAccess.html | 14 +- docs/colorDict.html | 14 +- docs/computeDivisors.html | 14 +- docs/concatenateStrings.html | 14 +- docs/concatenateUppercase.html | 14 +- docs/convertDynArray.html | 14 +- docs/cosTable.html | 14 +- docs/countingAncients.html | 14 +- docs/createArray.html | 14 +- docs/createOrderedColl.html | 14 +- docs/cubesCollect.html | 14 +- docs/cutString.html | 14 +- docs/decodeCaesar.html | 14 +- docs/decodeCipher.html | 14 +- docs/deleteMorphInstances.html | 14 +- docs/dynamicSize.html | 14 +- docs/editMorphBehaviorInspector.html | 14 +- docs/editShapeInspector.html | 14 +- docs/encodeCaesar.html | 14 +- docs/ensure.html | 14 +- docs/entitiesCount.html | 14 +- docs/exampleExample.html | 14 +- docs/exeAccurateDetection.html | 14 +- docs/exeCrossMorph.html | 14 +- docs/exeDescribePackage.html | 14 +- docs/exeDrawMobile.html | 14 +- docs/exeFancyClock.html | 14 +- docs/exeFloatPrecision.html | 14 +- docs/exeFractionPrecision.html | 14 +- docs/exeNegativeIntegers.html | 14 +- docs/exePlacement.html | 14 +- docs/exeRectMorph.html | 14 +- docs/exeRenameMethod.html | 14 +- docs/exeSavePkgSpacewar.html | 14 +- docs/exeSpaceShipClassSideDiagram.html | 14 +- docs/exeTorpedoDrawing.html | 14 +- docs/exeTorpedoExtent.html | 14 +- docs/exeZeroDivide.html | 14 +- docs/exerciseExample.html | 14 +- docs/fillArray.html | 14 +- docs/fireTorpedo.html | 14 +- docs/firstShipControl.html | 14 +- docs/floatInfo.html | 14 +- docs/forLoop.html | 14 +- docs/formatString.html | 14 +- docs/goldberg1.html | 14 +- docs/gravityForce.html | 14 +- docs/gravityVector.html | 14 +- docs/handleMouseOver.html | 14 +- docs/hello.html | 14 +- docs/hello2.html | 14 +- docs/helloBelle.html | 14 +- docs/helloCascade.html | 14 +- docs/holeSet.html | 14 +- docs/ifTrueIfFalse.html | 14 +- docs/implementingAndOr.html | 14 +- docs/index.html | 248 +++++- docs/initActors.html | 14 +- docs/initActorsCollections.html | 14 +- docs/initCentralStar.html | 14 +- docs/initFullActors.html | 14 +- docs/initMobileHierarchy.html | 14 +- docs/initSpaceShip.html | 14 +- docs/initSpacewar.html | 14 +- docs/initializeClass.html | 14 +- docs/instanceVariableMobileClass.html | 14 +- docs/integerBase.html | 14 +- docs/integerBasicTest.html | 14 +- docs/interval.html | 14 +- docs/intervalLoops.html | 14 +- docs/inverseSum.html | 14 +- docs/keyboardEvent.html | 14 +- docs/keyboardFocusEffect.html | 14 +- docs/methodConstant.html | 14 +- docs/methodTemplate.html | 14 +- docs/mobileClass.html | 14 +- docs/mobileDeepSpace.html | 14 +- docs/mobileUpdate.html | 14 +- docs/morphProperties.html | 14 +- docs/motionEquations.html | 14 +- docs/mouseEnter.html | 14 +- docs/mouseLeave.html | 14 +- docs/multiples7.html | 14 +- docs/multiplyBy1024.html | 14 +- docs/nameColor.html | 14 +- docs/negation.html | 14 +- docs/newtonModel.html | 14 +- docs/oddNonPrime.html | 14 +- docs/oddNumbers.html | 14 +- docs/playingDice.html | 14 +- docs/prime100.html | 14 +- docs/qtyPrime100.html | 14 +- docs/qtyPrime200.html | 14 +- docs/refactoryShipTorpedo.html | 14 +- docs/reflreshGamePlay.html | 14 +- docs/remDelArray.html | 14 +- docs/repeatLoop.html | 14 +- docs/roundingNumbers.html | 14 +- docs/secondShipControl.html | 14 +- docs/selectApples.html | 14 +- docs/setCollection.html | 14 +- docs/setLetters.html | 14 +- docs/setOpe.html | 14 +- docs/setWithoutDuplicates.html | 14 +- docs/shiftBits.html | 14 +- docs/shipAcceleration.html | 14 +- docs/shipCollision.html | 14 +- docs/shipControls.html | 14 +- docs/shipHeading.html | 14 +- docs/shipLost.html | 14 +- docs/shipSunCollision.html | 14 +- docs/shipsTorpedoesCollision.html | 14 +- docs/signal.html | 14 +- docs/simpleCipher.html | 14 +- docs/simpleControls.html | 14 +- docs/spaceShipDirection.html | 14 +- docs/spaceShipDrawing.html | 14 +- docs/spaceShipGetters.html | 14 +- docs/spaceShipGravity.html | 14 +- docs/spaceShipMechanic.html | 14 +- docs/spaceShipSetters.html | 14 +- docs/spacewarKeyStroke.html | 14 +- docs/spacewarVar.html | 14 +- docs/squaredSum.html | 14 +- docs/stringArith.html | 14 +- docs/teleportMethod.html | 14 +- docs/teleportShip.html | 14 +- docs/teleportShipInterval.html | 14 +- docs/torpedoClassVariables.html | 14 +- docs/torpedoMechanic.html | 14 +- docs/torpedoOrientation.html | 14 +- docs/torpedoSunCollision.html | 14 +- docs/twoCategoriesOnePackage.html | 14 +- docs/updateShipVelocity.html | 14 +- docs/updateShipsTorpedoes.html | 14 +- docs/verticesMethod.html | 14 +- en/chapter-03/contents.texinfo | 2 +- 313 files changed, 3605 insertions(+), 3489 deletions(-) diff --git a/bookSettings.texinfo b/bookSettings.texinfo index a92e4c11..e7df8949 100644 --- a/bookSettings.texinfo +++ b/bookSettings.texinfo @@ -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 diff --git a/docs/A-Clock-Morph.html b/docs/A-Clock-Morph.html index 16d76164..a49bd2d6 100644 --- a/docs/A-Clock-Morph.html +++ b/docs/A-Clock-Morph.html @@ -1,6 +1,6 @@ - + @@ -83,7 +85,7 @@ Next: , Previous: , Up: The Fundamentals of Morph   [Contents][Index]


-

7.2 A Clock Morph

+

7.2 A Clock Morph

With all the things we have already learned, we can build a more sophisticated morph. Let’s build a ClockMorph as see in Figure 7.5. @@ -91,8 +93,7 @@

7.2 A Clock Morph

ch07-05-Clock -
-

Figure 7.5: A clock morph

+

Figure 7.5: A clock morph

Let’s create ClockMorph, the dial clock :

@@ -103,7 +104,7 @@

7.2 A Clock Morph

category: 'Morphic-Learning'
- +

...and its drawing method in the category drawing:

@@ -120,7 +121,6 @@

7.2 A Clock Morph

aCanvas drawString: 'VI' at: -11 @ 70 font: nil color: Color brown. aCanvas drawString: 'IX' at: -90 @ -10 font: nil color: Color brown
-

Example 7.2: Drawing the clock dial

We create ClockHourHandMorph, the hand for the hours: @@ -222,14 +222,12 @@

7.2 A Clock Morph

ch07-07-ClockMorph-initialize -
-

Figure 7.6: Declaring unknown variables as instance variables in current class

+

Figure 7.6: Declaring unknown variables as instance variables in current class

Your ClockMorph class definition should now be complete!

ch07-08-ClockMorph-ivars-added -
-

Figure 7.7: ClockMorph with instance variables added

+

Figure 7.7: ClockMorph with instance variables added

Finally, we animate our clock. In method category stepping add the method:

@@ -277,8 +275,7 @@

7.2 A Clock Morph

ch07-06-ExerciseClock -
-

Figure 7.8: A fancy clock morph

+

Figure 7.8: A fancy clock morph

 CuisLogo @@ -287,8 +284,6 @@

7.2 A Clock Morph

decorated with a red and yellow disc is fancy? How will you modify our clock morph to get this result?

- -

Exercise 7.3: A fancy clock

Create some instances of your clock: ClockMorph new openInWorld. You can rotate and zoom. Look at the visual quality of diff --git a/docs/A-brief-introduction-to-Inspectors.html b/docs/A-brief-introduction-to-Inspectors.html index 4816e3c1..63968880 100644 --- a/docs/A-brief-introduction-to-Inspectors.html +++ b/docs/A-brief-introduction-to-Inspectors.html @@ -1,6 +1,6 @@ - + @@ -83,27 +85,25 @@ Next: , Previous: , Up: Visual with Morph   [Contents][Index]


-

6.4 A brief introduction to Inspectors

+

6.4 A brief introduction to Inspectors

To get the construction halo for an interior morph, just Middle-Click multiple times to “drill down” through the submorph hierarchy.

ch06-07-MiddleClickRect -
-

Figure 6.6: Middle-Click for construction +

Figure 6.6: Middle-Click for construction handles

ch06-08-2ndMidClckToSubmorph -
-

Figure 6.7: Middle-Click again to descend into +

Figure 6.7: Middle-Click again to descend into submorphs

There is an orange handle on the right, just under the green Duplicate handle. Left-Click this to get the Debug menu. Use this menu to get an Inspector for the rect.

- +

Observe Figure 6.8, on the left we have a pane for self, all inst vars, and the individual instance variables. Clicking to select “all inst vars” and the values pane on the right shows @@ -117,13 +117,12 @@

6.4 A brief introd

ch06-11aColorClickOnRect -
-

Figure 6.8: Add instance specific behavior

+

Figure 6.8: Add instance specific behavior

To add a behavior to all instances of a class, we create an instance method. Here we are going to create a behavior for “just this one BoxedMorph instance”.

- +

In addition to instance variables, a morph can have any number of named properties which can be different for each morph.

@@ -135,7 +134,6 @@

6.4 A brief introd self setProperty: #mouseButton1Up:localPosition: toValue: [:ignoredEvent :ignoredPosition| self color: Color random] -

Example 6.1: Edit the behavior of this morph from its Inspector

These properties are special to the user interface. You can find methods with these names in the Morph class to see what they @@ -148,26 +146,23 @@

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.

- +

One quick note on Move versus Pick up. Move moves a submorph “within” its parent. Pick up grabs a morph “out” of its parent.

ch06-09-Move-Within -
-

Figure 6.9: Move submorph within its parent

+

Figure 6.9: Move submorph within its parent

ch06-10-PickUp-2-MoveOut -
-

Figure 6.10: Pick a submorph out of its parent

+

Figure 6.10: Pick a submorph out of its parent

Before we go on, let’s use an inspector on the ellipse to change values of a couple of its instance variables.

ch06-12-InspectEllipse -
-

Figure 6.11: Inspect instance variables of the ellipse

+

Figure 6.11: Inspect instance variables of the ellipse

Observe Figure 6.12 and Example 6.2. In the lower pane of the inspector, code can be executed in the context of the inspected object. self refers to the instance. Here @@ -178,12 +173,10 @@

6.4 A brief introd
self borderWidth: 10.
 self borderColor: Color blue
 
-

Example 6.2: Edit the state of this ellipse from its Inspector

ch06-14-SetBorderColor -
-

Figure 6.12: Use Inspector to set border color and +

Figure 6.12: Use Inspector to set border color and border width

In the typical case one wants to refine or change behaviors for all instances of a class. diff --git a/docs/A-brief-introduction-to-the-system-Browser.html b/docs/A-brief-introduction-to-the-system-Browser.html index e061bbc0..d6ea8537 100644 --- a/docs/A-brief-introduction-to-the-system-Browser.html +++ b/docs/A-brief-introduction-to-the-system-Browser.html @@ -1,6 +1,6 @@ - + @@ -85,16 +87,16 @@ Next: , Previous: , Up: The Message Way of Life   [Contents][Index]


-

2.5 A brief introduction to the system Browser

- +

2.5 A brief introduction to the system Browser

+

Smalltalk organizes instance behaviors using classes. -A class is an object which holds a set of methods to be executed +A class is an object that holds a set of methods to be executed when one of its instances receives a message that is the name of one of these methods.

-

The System Browser, in short the Browser, is a tool to +

The System Browser, in short, the Browser, is a tool to rule all the classes in Cuis-Smalltalk. It is both a tool to explore the classes (system or user ones) and to write new classes and methods.

@@ -103,10 +105,9 @@

2.5 A brie

ch02-browserDetailed -
-

Figure 2.1: The System Browser

- - +

Figure 2.1: The System Browser

+ +

At the top left are the class categories, groups of classes sharing the same theme. A category can also be used to create a Package, which is an organisational element to save code in a @@ -117,7 +118,7 @@

2.5 A brie categories such as Kernel-Text and Kernel-Chronology related to text and date entities.

- +

Next to the right are the classes in the selected class category. They are nicely presented in a parent-child class hierarchy. When a class is first selected in this pane, its declaration appears in the large pane @@ -158,7 +159,7 @@

2.5 A brie of Number adds methods (which define behaviors) unknown to an instance of Magnitude. We will explore this in detail as we go forward.

- +

To learn about the purpose of a class, it is good practice to always visit the class comment. Often a comment also comes with code examples to learn how to use the object; these code snippets can be @@ -166,7 +167,7 @@

2.5 A brie Figure 2.1, see the comment button to read or to edit the comment of the selected class.

- +

To the right of the class panel is the method categories panel. A class may have many methods, so grouping them by category helps other users orient themselves in finding related methods. @@ -176,8 +177,8 @@

2.5 A brie directly gives access to related methods in the next and last pane at the right.

- - + +

 note @@ -195,11 +196,9 @@

2.5 A brie in the arithmetic method category of the CharacterSequence class?

- -

Exercise 2.3: Count of methods

- +

In the Browser, once a method is selected – as in Figure 2.1, abs method – the bottom part shows its source code, ready to be explored or edited. Often, @@ -208,8 +207,8 @@

2.5 A brie

Every object knows its own class and will respond with it when sent the message #class.

- - + +

Tip. In the workspace Ctrl-b (Browse) on the class name will open a Browser on the named class:

diff --git a/docs/Back-to-Spacewar_0021-Morphs.html b/docs/Back-to-Spacewar_0021-Morphs.html index cf5be8e5..810e0676 100644 --- a/docs/Back-to-Spacewar_0021-Morphs.html +++ b/docs/Back-to-Spacewar_0021-Morphs.html @@ -1,6 +1,6 @@ - + @@ -83,10 +85,10 @@ Previous: , Up: The Fundamentals of Morph   [Contents][Index]


-

7.3 Back to Spacewar! Morphs

+

7.3 Back to Spacewar! Morphs

-

7.3.1 Central star

+

7.3.1 Central star

Our central star has an extent of 30 @ 30 we need to use @@ -98,7 +100,6 @@

7.3.1 Central star

CentralStar>>morphExtent
    ^ `30 @ 30`
 
-

Example 7.3: Central star extent

 note @@ -109,8 +110,8 @@

7.3.1 Central star

is called: the pre-built value is used instead.

- - + +

As you learnt previously, a morph draws itself from its drawOn: method. We draw the star as an ellipse with randomly @@ -127,7 +128,6 @@

7.3.1 Central star

borderColor: Color orange fillColor: Color yellow -

Example 7.4: A star with a fluctuating size

The star diameters in the x and y directions are fluctuating independently of 0 to 2 units. The star does not look perfectly round. @@ -135,11 +135,10 @@

7.3.1 Central star

ch07-09-fluctuatingStar -
-

Figure 7.9: A star with a fluctuating size

+

Figure 7.9: A star with a fluctuating size

-

7.3.2 Space ship

+

7.3.2 Space ship

At the game start-up, the nose of the space ship is pointing to the top of the screen as seen in Figure 7.10 and the angle of its direction is therefore -90°, while the angle of its @@ -148,8 +147,7 @@

7.3.2 Space ship

ch07-10-ShipDiagram -
-

Figure 7.10: Space ship diagram at game start-up

Then its drawOn: method is written as: +

Figure 7.10: Space ship diagram at game start-up

Then its drawOn: method is written as:

@@ -167,7 +165,6 @@

7.3.2 Space ship

acceleration ifNotZero: [ canvas line: c to: 0 @ 35 width: 1 color: Color gray]
-

Example 7.5: Space ship drawing

@@ -176,8 +173,6 @@

7.3.2 Space ship

the space ship drawOn: method with the gas exhaust drawing depends on the acceleration rate?

- -

Exercise 7.4: Gas exhaust drawing

When there is an acceleration from the engine, we draw a small gray line to represent the gas exhaust. @@ -207,8 +202,8 @@

7.3.2 Space ship

location attribute represents an affine transformation, and we get its rotation angle with the #radians message.

- - + +
Mobile>>heading
    ^ location radians - Float halfPi
@@ -224,7 +219,7 @@ 

7.3.2 Space ship

-

7.3.3 Torpedo

+

7.3.3 Torpedo

Alike a space ship, when a torpedo is just instantiated its nose @@ -233,8 +228,7 @@

7.3.3 Torpedo

ch07-11-TorpedoDiagram -
-

Figure 7.11: Torpedo diagram at game start-up

+

Figure 7.11: Torpedo diagram at game start-up

 CuisLogo @@ -242,8 +236,6 @@

7.3.3 Torpedo

given by Figure 7.11, how will you write its morphExtent method?

- -

Exercise 7.5: Torpedo extent

@@ -252,16 +244,14 @@

7.3.3 Torpedo

How will you write the Torpedo’s drawOn: method?

- -

Exercise 7.6: Torpedo drawing

-

7.3.4 Drawing revisited

+

7.3.4 Drawing revisited

- - + +

As you may have observed, the SpaceShip and Torpedo drawOn: methods share the same logic: drawing a polygon given its vertices. We likely want to push this common logic to their common @@ -293,7 +283,7 @@

7.3.4 Drawing revisited

torpedoes, the vertices array will be duplicated 200 times with the same data!

-

Class instance variable

+

Class instance variable

In that kind of situation, what you want is a class instance variable defined in the class side – in contrast to the instance @@ -330,7 +320,6 @@

Class instance variableMobile class instanceVariableNames: 'vertices'

-

Example 7.6: vertices an instance variable in Mobile class

Then we write an access method in the Mobile class, so SpaceShip and Torpedo instances can access it: @@ -342,10 +331,9 @@

Class instance variable
ch07-12-browserClassSide -
-

Figure 7.12: The class side of the System Browser

+

Figure 7.12: The class side of the System Browser

- +

Next, each subclass is responsible to correctly initialize vertices with its initialize class method:

@@ -359,7 +347,6 @@

Class instance variable -

Example 7.7: Initialize a class

When a class is installed in Cuis-Smalltalk, its initialize class @@ -383,7 +370,6 @@

Class instance variable -

Example 7.8: A class instance variable value is not shared by the subclasses

This is really the behavior we want: SpaceShip and Torpedo instances have a different diagram. However, every @@ -391,7 +377,7 @@

Class instance variablevertices array (i.e. same location in the computer memory).

- +

Each instance asks its class side with the #class message:

@@ -418,8 +404,6 @@

Class instance variable CuisLogo How will you rewrite SpaceShip’s drawOn: to use the vertices in its class side?

- -

Exercise 7.7: Space ship access to its diagram in class side

So far, we still have this redundancy in the drawOn: methods. What we want is Mobile to be responsible to draw the @@ -449,12 +433,10 @@

Class instance variabledrawOn:polygon: method in Mobile? Tip: use the iterator withIndexDo:.

- -

Exercise 7.8: Draw on Mobile

-

Class variable

- - +

Class variable

+ +

A class variable is written capitalized in the argument of classVariableNames: keyword: @@ -467,7 +449,6 @@

Class variable

poolDictionaries: '' category: 'Spacewar!' -

Example 7.9: Vertices a class variable in Mobile

As a class instance variable, it can be directly accessed from the class side and instances are grant access only with messages send to @@ -484,7 +465,7 @@

Class variable

-

7.3.5 Drawing simplified

+

7.3.5 Drawing simplified

Using a class variable in the present game design is a bit overkill. It was an excuse to present the concept of class variables. If the game came with an editor where the user redesigns @@ -502,14 +483,13 @@

7.3.5 Drawing simplified

Torpedo>>vertices ^ `{0@-4 . -2@4 . 2@4}`
-

Example 7.10: Vertices returned by an instance method

Then in the drawing methods, we replace self class vertices by self vertices.

-

7.3.6 Collisions revisited

+

7.3.6 Collisions revisited

In Example 4.23, we have a very naive approach for collision between the central star and the ships, based on distance between morphs. It was very inaccurate. @@ -522,8 +502,7 @@

7.3.6 Collisions revisited

ch07-13-shipDisplayBounds -
-

Figure 7.13: The display bounds of a space ship

+

Figure 7.13: The display bounds of a space ship

When browsing the Rectangle class, you learn the #intersects: message tells us if two rectangles overlap. This is what we need for a more accurate collision detection between the @@ -537,7 +516,6 @@

7.3.6 Collisions revisited

aShip flashWith: Color red. self teleport: aShip]] -

Example 7.11: Collision (rectangle overlapping) between the ships and the Sun

@@ -554,7 +532,6 @@

7.3.6 Collisions revisited

aShip flashWith: Color red. self teleport: aShip]] -

Example 7.12: Collision (pixel precision) between the ships and the Sun

@@ -562,8 +539,6 @@

7.3.6 Collisions revisited

 CuisLogo Rewrite the three collision detection methods between space ships, torpedoes and the central star.

- -

Exercise 7.9: Accurate collision detection


diff --git a/docs/Beginnings.html b/docs/Beginnings.html index 4b13d1a3..6cfd825b 100644 --- a/docs/Beginnings.html +++ b/docs/Beginnings.html @@ -1,6 +1,6 @@ - + @@ -83,7 +85,7 @@ Next: , Previous: , Up: The Cuis Book   [Contents][Index]


-

1 Beginnings

+

1 Beginnings

The computer is simply an instrument whose music is ideas. diff --git a/docs/Block-syntax.html b/docs/Block-syntax.html index 75d023c6..2727bf59 100644 --- a/docs/Block-syntax.html +++ b/docs/Block-syntax.html @@ -1,6 +1,6 @@ - + @@ -82,8 +84,8 @@ Next: , Previous: , Up: Control Flow Messaging   [Contents][Index]


-

5.4 Block syntax

- +

5.4 Block syntax

+

Blocks provide a mechanism to defer the evaluation of expressions. A block is essentially an anonymous function. A block is evaluated by @@ -97,7 +99,7 @@

5.4 Block syntax

⇒ 3 - +

Blocks may take parameters, each of which is declared with a leading colon. A vertical bar separates the parameter declaration(s) from the body of the block. To evaluate a block with one parameter, you must @@ -116,7 +118,7 @@

5.4 Block syntax

with a large number of parameters is often a sign of a design problem.)

- +

Blocks may also declare local variables, which are surrounded by vertical bars, just like local variable declarations in a method. Locals are declared after any arguments: @@ -142,7 +144,7 @@

5.4 Block syntax

⇒ 3 - +

Blocks are instances of the class BlockClosure. This means that they are objects, so they can be assigned to variables and passed as arguments just like any other object. @@ -159,7 +161,6 @@

5.4 Block syntax

(1 to: m) select: [:d | m \\ d = 0] "⇒ #(1 3 5 9 15 45)" -

Example 5.2: Compute divisors

The problem with this example is the code duplication in the divisor computation. We can avoid duplication with a dedicated block doing the @@ -171,10 +172,8 @@

5.4 Block syntax

How will you rewrite Example 5.2 to avoid code duplication?

- -

Exercise 5.1: Block to compute divisors

- +

The SpaceWar>>teleport: method contains a nice example using a block to avoid code duplication to generate random abscissa and ordinate coordinates. Each time a new coordinate is needed, the @@ -192,7 +191,6 @@

5.4 Block syntax

velocity: 0 @ 0; morphPosition: randomCoordinate value @ randomCoordinate value -

Example 5.3: teleport: method

diff --git a/docs/Building-your-specialized-Morph.html b/docs/Building-your-specialized-Morph.html index b8c9bcd7..28e43a9c 100644 --- a/docs/Building-your-specialized-Morph.html +++ b/docs/Building-your-specialized-Morph.html @@ -1,6 +1,6 @@ - + @@ -83,8 +85,8 @@ Next: , Previous: , Up: Visual with Morph   [Contents][Index]


-

6.5 Building your specialized Morph

- +

6.5 Building your specialized Morph

+

Let’s make a simple subclass which changes color when Left-Clicked. Create a new class just as we did with Spacewar! but subclass EllipseMorph with #ColorClickEllipse. @@ -99,7 +101,7 @@

6.5 Building your spe

Save the class definition with Ctrl-s.

- +

Right-Click on the Message Category pane and select new category.... This brings up a number of selections and allows us to create new ones. Select “event handling testing”. @@ -112,7 +114,7 @@

6.5 Building your spe - +

Likewise, add a new catagory “event handing” and add the other method we need.

@@ -129,8 +131,7 @@

6.5 Building your spe

ch06-15-ColorClickEllipse -
-

Figure 6.13: Obtain a ColorClickEllipse

+

Figure 6.13: Obtain a ColorClickEllipse

Now you know how to specialize an individual morph, or make a whole new class of them!

diff --git a/docs/Class-_002d-Model-of-Communicating-Entities.html b/docs/Class-_002d-Model-of-Communicating-Entities.html index 1ae146ef..601c5748 100644 --- a/docs/Class-_002d-Model-of-Communicating-Entities.html +++ b/docs/Class-_002d-Model-of-Communicating-Entities.html @@ -1,6 +1,6 @@ - + @@ -83,7 +85,7 @@ Next: , Previous: , Up: The Cuis Book   [Contents][Index]


-

3 Class, Model of Communicating Entities

+

3 Class, Model of Communicating Entities

If I give you something that you can play with and extend, even a @@ -101,9 +103,9 @@

3 Class, Mod
-

Cuis-Smalltalk is a pure object oriented programming (OOP) language. All the +

Cuis-Smalltalk is a pure object-oriented programming (OOP) language. All the entities in the language: integers, floats, rational numbers, strings, -collections, blocks of code and so forth – every instance usable as a +collections, blocks of code, and so forth – every instance usable as a noun in Smalltalk – is an object.

diff --git a/docs/Class-_002d_002d-model-of-Communicating-Entities-_0028Solutions_0029.html b/docs/Class-_002d_002d-model-of-Communicating-Entities-_0028Solutions_0029.html index aade5071..889b89c0 100644 --- a/docs/Class-_002d_002d-model-of-Communicating-Entities-_0028Solutions_0029.html +++ b/docs/Class-_002d_002d-model-of-Communicating-Entities-_0028Solutions_0029.html @@ -1,6 +1,6 @@ - + @@ -81,19 +83,19 @@ Next: , Previous: , Up: Solutions to the Exercises   [Contents][Index]


-

Class, model of Communicating Entities

-

Exercise 3.1

+

Class, model of Communicating Entities

+

Exercise 3.1

When the Float is selected, the wide text pane prints: “class definition for Float ° 92 instance methods ° 34 class methods ° 1280 total lines of code”

-

Exercise 3.2

+

Exercise 3.2

0 to: Float twoPi by: 1/10 do: [:i |
    Transcript show: i cos; cr]
 
-

Exercise 3.3

+

Exercise 3.3

1024 is not a random number. It is 210 then written in base 2 : 10000000000, it is also 1 << 10:

@@ -110,7 +112,7 @@

Exercise 3.4

+

Exercise 3.4

5.2 + 0.9  - 6.1
 ⇒ 8.881784197001252e-16
@@ -122,10 +124,10 @@ 

Exercise 3.5

+

Exercise 3.5

The system returns the error ZeroDivide, division by zero.

-

Exercise 3.6

+

Exercise 3.6

(52/10) + (9/10)  - (61/10)
 ⇒ 0
@@ -137,7 +139,7 @@ 

Exercise 3.7

+

Exercise 3.7

There are different options, with slightly different results:

'There are 12 apples' select: [:i |i isLetter].
@@ -156,7 +158,7 @@ 

Exercise 3.8

+

Exercise 3.8

In String, search for the method category format, there you find the format: method:

@@ -166,7 +168,7 @@

Exercise 3.9

+

Exercise 3.9

The SpaceWar, CentralStar and SpaceShip definitions with their added instance variable should look like:

@@ -190,7 +192,7 @@

Exercise 3.10

+

Exercise 3.10

SpaceShip>>position
    ^ position
@@ -202,7 +204,7 @@ 

Exercise 3.11

+

Exercise 3.11

SpaceShip>>position: aPoint
    position := aPoint
@@ -214,7 +216,7 @@ 

Exercise 3.12

+

Exercise 3.12

SpaceShip>>left
 "Rotate the ship to its left"
@@ -225,7 +227,7 @@ 

Exercise 3.13

+

Exercise 3.13

SpaceShip>>push
 "Init an acceleration boost"
@@ -237,7 +239,7 @@ 

Exercise 3.14

+

Exercise 3.14

CentralStar>>initialize
    super initialize.
diff --git a/docs/Code-Management-_0028Solutions_0029.html b/docs/Code-Management-_0028Solutions_0029.html
index 80f4346e..ce3e74d9 100644
--- a/docs/Code-Management-_0028Solutions_0029.html
+++ b/docs/Code-Management-_0028Solutions_0029.html
@@ -1,6 +1,6 @@
 
 
-
+
 
 
 
 
 
@@ -80,9 +82,9 @@
 Previous: , Up: Solutions to the Exercises   [Contents][Index]


-

Code Management

+

Code Management

-

Exercise 9.3

+

Exercise 9.3

  1. In the System Browser, create two class categories: in its most left pane menu select add item... (a) and key in one diff --git a/docs/Code-Management.html b/docs/Code-Management.html index 66aecded..c2b885fc 100644 --- a/docs/Code-Management.html +++ b/docs/Code-Management.html @@ -1,6 +1,6 @@ - + @@ -83,7 +85,7 @@ Next: , Previous: , Up: The Cuis Book   [Contents][Index]


-

9 Code Management

+

9 Code Management

Change is easy, except for the changed part. diff --git a/docs/Collections-detailed.html b/docs/Collections-detailed.html index 3adb1816..fe14fe57 100644 --- a/docs/Collections-detailed.html +++ b/docs/Collections-detailed.html @@ -1,6 +1,6 @@ - + @@ -82,20 +84,20 @@ Next: , Previous: , Up: The Collection Way of Life   [Contents][Index]


-

4.4 Collections detailed

- +

4.4 Collections detailed

+

The Collections- class categories are the most prolific, there are 7 of them gathering 46 classes.

- -

The category Collections-Abstract groups classes which are + +

The category Collections-Abstract groups classes that are said to be abstract. An abstract class cannot be instantiated, its behavior is declared but not completely implemented. It is the responsibility of its subclasses to implement the missing part of the behavior.

An abstract class is useful to establish a set of polymorphic methods -which each of its concrete subclasses are expected to specialize. +which each of its concrete subclasses is expected to specialize. This captures and communicates our intent.

Observe how the important do: method is declared @@ -124,17 +126,17 @@

4.4 Collections detailed

-

Two important groups of collections must be distinguished: collection -with a fixed size and collection with a variable size. +

Two important groups of collections must be distinguished: collections +with a fixed size and collections with a variable size.

- +

Collection of fixed size. Such collections are gathered in the category Collections-Arrayed. The most notable one is Array, its size – the number of elements it can hold – is set when creating the instance. Once instantiated, you can neither add nor delete elements to an array.

- +

There are different ways to create Array instance: @@ -146,17 +148,16 @@

4.4 Collections detailed

array2 := Array with: 2 with: 'Apple' with: 2@3 with: 1/3. array3 := Array ofSize: 4 "an empty array with a 4 element capacity"
-

Example 4.9: Collection with a fixed size

Array array1 and array1b are bit -different. The former one is created and filled with its contents at +different. The former one is created and filled with its contents during the compile time of the code, the consequence is it can only be filled -with literal elements as integer, float, string. The later one is -created at execution time of the code, it can be filled with elements +with literal elements such as integer, float, or string. The latter one is +created at the execution time of the code, it can be filled with elements instantiated at the execution time as Fraction or Point instances.

- +

You can access elements with an important variety of messages:

@@ -171,9 +172,8 @@

4.4 Collections detailed

array1 at: 2 put: 'Orange'; yourself ⇒ #(2 'Orange' $@ 4) array1 indexOf: 'Orange ⇒ 2
-

Example 4.10: Collection access to elements

-

Use the System Browser to discover alternative way to access elements +

Use the System Browser to discover alternative ways to access elements of a collection.

@@ -183,8 +183,6 @@

4.4 Collections detailed

appropriate message to access the first 2 elements of the array1 collection?

- -

Exercise 4.12: Access part of a collection

You can’t add or remove an element, though:

@@ -203,10 +201,8 @@

4.4 Collections detailed

Fill every element in array1 with ’kiwi’ all at once?

- -

Exercise 4.13: Fill an array

- +

Collection of variable size. Such collection are gathered in several class categories: Collections-Unordered, Collections-Sequenceable, etc. They represent the most common @@ -216,7 +212,7 @@

4.4 Collections detailed

elements are added one after the other in sequence18. Its size is variable depending on added or removed elements.

- +
@@ -225,7 +221,6 @@

4.4 Collections detailed

coll2 := OrderedCollection with: 2 with: 'Apple' with: 2@1 with: 1/3 coll3 := OrderedCollection ofSize: 4
-

Example 4.11: Collection with a variable size

The access to elements is identical to an Array instance, but dynamic collections allow you to add and remove elements: @@ -237,7 +232,6 @@

4.4 Collections detailed

coll1 remove: 2@1; yourself ⇒ an OrderedCollection(2 'Apple' 1/3) -

Example 4.12: Adding, removing element from a dynamic array

@@ -246,13 +240,11 @@

4.4 Collections detailed

How to add ’Orange’ after ’Apple’ in coll1?

- -

Exercise 4.14: Add an element after

- +

Set. Set is an unordered collection without duplicated -elements. The order of the element is not guaranteed, though. Observe +elements. The order of the elements is not guaranteed, though. Observe how pi is the first element of the set:

@@ -261,9 +253,8 @@

4.4 Collections detailed

set add: 1; add: Float pi; yourself ⇒ a Set(3.141592653589793 1)
-

Example 4.13: Set collection

-

Non duplicate are guaranteed at least, even with number of different +

Nonduplicates are guaranteed at least, even with a number of different types. Observe how 1, 3/3 and 1.0 are considered equal and not duplicated in the set:

@@ -273,12 +264,11 @@

4.4 Collections detailed

set add: 1; add: Float pi; add: 3/3; add: 1/3; add: 1.0; yourself ⇒ a Set(1/3 3.141592653589793 1) -

Example 4.14: Set, without duplicates

- +

A very handy way to create a Set instance, or any other -collection, is to create a dynamic array and convert it with the +collection is to create a dynamic array and convert it with the #asSet message:

@@ -286,7 +276,6 @@

4.4 Collections detailed

{1 . Float pi . 3/3 . 1/3 . 1.0} asSet
 ⇒ a Set(3.141592653589793 1/3 1)
 
-

Example 4.15: Convert dynamic array

Observe the alternate conversion messages:

@@ -314,13 +303,11 @@

4.4 Collections detailed

How will you collect the letters in the sentences ’buenos días’ and ’bonjour’?

- -

Exercise 4.15: Letters

- +

Dictionary. A dictionary is a list of associations between a -key and an object. Of course a key is an object, but it must respond +key and an object. Of course, a key is an object, but it must respond to equality tests. Most of the time, symbols are used as keys.

To compile a list of colors: @@ -334,7 +321,6 @@

4.4 Collections detailed

add: #blue -> Color blue; add: #green -> Color green -

Example 4.16: Dictionary of colors

There are shorter descriptions:

@@ -355,7 +341,7 @@

4.4 Collections detailed

-

There are different way to access a dictionary contents: +

There are different ways to access a dictionary’s contents:

colors keys.
@@ -372,7 +358,7 @@ 

4.4 Collections detailed

⇒ (Color r: 1.000 g: 1.000 b: 0.078) (Color r: 0.898 g: 0.000 b: 0.000)...
-

Sometimes, you really need to iterated the whole key-value association: +

Sometimes, you really need to iterate the whole key-value association:

colors associationsDo: [:assoc | 
@@ -389,8 +375,6 @@ 

4.4 Collections detailed

dictionary to replace its values with a nicely capitalized string representing the name of the color?

- -

Exercise 4.16: Color by name

There are many more collections to explore. You now know enough to explore and to search by yourself with the System Browser, and to @@ -404,8 +388,8 @@

Footnotes

(18)

Of course you can -insert an element between two elements. However LinkList -instance are more efficient for this use case.

+insert an element between two elements. However, a LinkList +instance is more efficient for this use case.



-

2.1 Communicating entities

+

2.1 Communicating entities

- - + +

When a given entity receives a message from another entity, it @@ -108,13 +110,12 @@

2.1 Communicating entities

- +
ProtoObject allSubclasses sum: [ :class | class allInstances size] 
 ⇒ 152058
 
-

Example 2.1: Calculating the number of entities

The count of classes, the models for the entities – instances of the class Class – is less than 700.

@@ -123,7 +124,6 @@

2.1 Communicating entities

Smalltalk allClasses size ⇒ 671 -

Example 2.2: Calculating the number of classes

 note @@ -132,7 +132,7 @@

2.1 Communicating entities

-

To be honest, in our previous chapter we skipped this important detail +

To be honest, in our previous chapter, we skipped this important detail on Smalltalk design. We wrote about message sending without explaining much, we wanted you to discover this design informally. The scripts you diff --git a/docs/Control-Flow-Messaging-_0028Solutions_0029.html b/docs/Control-Flow-Messaging-_0028Solutions_0029.html index 50ab8372..f527918e 100644 --- a/docs/Control-Flow-Messaging-_0028Solutions_0029.html +++ b/docs/Control-Flow-Messaging-_0028Solutions_0029.html @@ -1,6 +1,6 @@ - + @@ -81,8 +83,8 @@ Next: , Previous: , Up: Solutions to the Exercises   [Contents][Index]


-

Control Flow Messaging

-

Exercise 5.1

+

Control Flow Messaging

+

Exercise 5.1

| divisors |
 divisors := [:x | (1 to: x) select: [:d | x \\ d = 0] ].
@@ -92,17 +94,17 @@ 

Exercise 5.2

+

Exercise 5.2

Check the implementations in Boolean, True and False.

-

Exercise 5.3

+

Exercise 5.3

Once the method is edited and saved, in the Method pane select its name teleport: then do ...right click → more...change category...events...

-

Exercise 5.4

+

Exercise 5.4

In the Method pane, select one uncategorized control method, then do ...right click → more...change categorynew... key-in @@ -111,7 +113,7 @@

control at the last step as this category now exists.

-

Exercise 5.5

+

Exercise 5.5

We do not need an iterator to detect a collision between two ships. However we use an iterator to take action on each ship when a collision is detected. @@ -130,7 +132,7 @@

Exercise 5.6

+

Exercise 5.6

You just need to pick the appropriate code snippets from the referenced exercise and examples.

diff --git a/docs/Control-Flow-Messaging.html b/docs/Control-Flow-Messaging.html index d4a5f7b7..d2184faf 100644 --- a/docs/Control-Flow-Messaging.html +++ b/docs/Control-Flow-Messaging.html @@ -1,6 +1,6 @@ - + @@ -83,7 +85,7 @@ Next: , Previous: , Up: The Cuis Book   [Contents][Index]


-

5 Control Flow Messaging

+

5 Control Flow Messaging

Fools ignore complexity. Pragmatists suffer it. Some can avoid diff --git a/docs/Control-flow-with-block-and-message.html b/docs/Control-flow-with-block-and-message.html index 6829b6a4..756e0415 100644 --- a/docs/Control-flow-with-block-and-message.html +++ b/docs/Control-flow-with-block-and-message.html @@ -1,6 +1,6 @@ - + @@ -83,7 +85,7 @@ Next: , Previous: , Up: Control Flow Messaging   [Contents][Index]


-

5.5 Control flow with block and message

+

5.5 Control flow with block and message

Deciding to send this message instead of that @@ -93,8 +95,8 @@

5.5 Control flow Decision logic is expressed by sending messages to booleans, numbers and collections with blocks as arguments.

-

Test

- +

Test

+ @@ -134,7 +136,6 @@

Test

False>>ifTrue: trueAlternativeBlock ifFalse: falseAlternativeBlock ^ falseAlternativeBlock value -

Example 5.4: Implementations of ifTrue:ifFalse:

In fact, this is the essence of OOP: when a message is sent to an object, the object itself determines which method will be used to @@ -150,7 +151,6 @@

Test

"Negation----answer false since the receiver is true." ^ false -

Example 5.5: Implementing negation

Booleans offer several useful convenience methods, such as ifTrue:, ifFalse:, ifFalse:ifTrue:. You also @@ -176,8 +176,6 @@

Test

 CuisLogo Try to imagine how and: and or: are implemented.

- -

Exercise 5.2: Implementing and: and or:

In the Example 5.1 at the beginning of this chapter, there are 4 control flow #ifTrue: messages. Each argument is a block of @@ -207,12 +205,11 @@

Test

velocity := velocity / 2. self morphPosition: self morphPosition negated] -

Example 5.6: Ship lost in space

-

Loop

- - +

Loop

+ +

Loops are typically expressed by sending messages to blocks, integers or collections. Since the exit condition for a loop may be repeatedly diff --git a/docs/Cuis-system-classes.html b/docs/Cuis-system-classes.html index 70a34eec..3ec656cc 100644 --- a/docs/Cuis-system-classes.html +++ b/docs/Cuis-system-classes.html @@ -1,6 +1,6 @@ - + @@ -81,9 +83,9 @@ Next: , Previous: , Up: Class, Model of Communicating Entities   [Contents][Index]


-

3.3 Cuis system classes

+

3.3 Cuis system classes

As we noted above, Cuis-Smalltalk is a pure object-oriented environment. This -means that every single entitiy you are dealing with is represented +means that every single entity you are dealing with is represented as an instance of a class written in Cuis-Smalltalk itself. As a direct consequence, Cuis-Smalltalk is mostly written in itself. This means the entire system is open to you to learn and play with. @@ -104,7 +106,7 @@

3.3 Cuis system classes

- +

We want to record these image preferences in a @@ -189,9 +191,8 @@

9.5.1 Automate your image

ch10-ImageSetUp -
-

Figure 9.13: Environment of an image started with the set up script

- +

Figure 9.13: Environment of an image started with the set up script

+

Let’s start by removing the open windows:

diff --git a/docs/Debug-and-Exception-Handling.html b/docs/Debug-and-Exception-Handling.html index 156a3306..a5dcdb7b 100644 --- a/docs/Debug-and-Exception-Handling.html +++ b/docs/Debug-and-Exception-Handling.html @@ -1,6 +1,6 @@ - + @@ -83,7 +85,7 @@ Next: , Previous: , Up: The Cuis Book   [Contents][Index]


-

10 Debug and Exception Handling

+

10 Debug and Exception Handling

Reactive Principle: Every component accessible to the user diff --git a/docs/Documents-Copyright.html b/docs/Documents-Copyright.html index 417988ec..e483f47c 100644 --- a/docs/Documents-Copyright.html +++ b/docs/Documents-Copyright.html @@ -1,6 +1,6 @@ - + @@ -80,7 +82,7 @@ Next: , Previous: , Up: The Cuis Book   [Contents][Index]


- +

Part of the syntax chapter from the Squeak by Example book was borrowed and edited in the present book. @@ -88,17 +90,17 @@

Figure 1.4

+

Figure 1.4

Spacewar running on PDP-1, Joi Ito, 12 May 2007, resized,
https://www.flickr.com/photos/35034362831@N01/494431001
https://creativecommons.org/licenses/by/2.0/deed.en

-

Adele Goldberg quote

+

Adele Goldberg quote

Oral History of Adele Goldberg, Computer History Museum, 10 May 2010

-

Cuis-Smalltalk mascot

+

Cuis-Smalltalk mascot

CuisLogo

The southern mountain cavy (Microcavia australis) is a species of diff --git a/docs/E_002dexeRectMorph.html b/docs/E_002dexeRectMorph.html index 11111710..b19156b8 100644 --- a/docs/E_002dexeRectMorph.html +++ b/docs/E_002dexeRectMorph.html @@ -1,6 +1,6 @@ - + @@ -10,15 +10,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 diff --git a/docs/E_002dimg1.html b/docs/E_002dimg1.html index d2360bb5..1ac94001 100644 --- a/docs/E_002dimg1.html +++ b/docs/E_002dimg1.html @@ -1,6 +1,6 @@ - + @@ -10,15 +10,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 diff --git a/docs/Ellipse-Morph.html b/docs/Ellipse-Morph.html index 7d134908..0f2aab6d 100644 --- a/docs/Ellipse-Morph.html +++ b/docs/Ellipse-Morph.html @@ -1,6 +1,6 @@ - + @@ -82,8 +84,8 @@ Next: , Previous: , Up: Visual with Morph   [Contents][Index]


-

6.2 Ellipse Morph

- +

6.2 Ellipse Morph

+

Let’s start with one of the basic morphs, an EllipseMorph. You could write EllipseMorph new openInWorld and Do-it, but we are doing visual things for now, so let’s @@ -95,8 +97,7 @@

6.2 Ellipse Morph

ch06-01-EllipseMorphFromMenu -
-

Figure 6.1: Select EllipseMorph from a +

Figure 6.1: Select EllipseMorph from a menu

The basic challenge of user interface design is to communicate visibility and control. @@ -106,7 +107,7 @@

6.2 Ellipse Morph

useful strategy is to reveal capabilities in context as they are needed.

- +

In the case of Cuis-Smalltalk, you have to know some basics because helpful tools are there but stay out of the way. At any time you can Right-Click on the desktop to get the World Menu. You can also @@ -121,8 +122,7 @@

6.2 Ellipse Morph

ch06-03-DragToEnlarge -
-

Figure 6.2: Drag construction handle to change size

+

Figure 6.2: Drag construction handle to change size

Now that you know this, move the yellow lower right handle with tool tip Change size via Click-Drag. Just hold down the left mouse button while the cursor is over the handle, move the cursor @@ -130,8 +130,7 @@

6.2 Ellipse Morph

ch06-04-Enlarged -
-

Figure 6.3: A larger ellipse

+

Figure 6.3: A larger ellipse



-

Events

+

Events

-

Exercise 8.1

+

Exercise 8.1

The method handlesMouseOver:, implemented in the SpaceWar morph class, returns true so the game play is informed of mouse over events in dedicated methods. @@ -92,7 +94,7 @@

Exercise 8.2

+

Exercise 8.2

You need to browse the Morph>>handlesMouseOver: method and read the comment. It writes about a #mouseEnter: message; we implement the matching method in SpaceWar class with the @@ -103,7 +105,7 @@

Exercise 8.3

+

Exercise 8.3

The message #mouseLeave: is sent to our SpaceWar instance each time the mouse cursor move out (leaves) of the game play. Therefore we add the homonym method to the SpaceWar @@ -114,7 +116,7 @@

Exercise 8.4

+

Exercise 8.4

The #handlesKeyboard message is sent to a morph to know if it wants to receive keyboard event. The morph responds true to this message to state its interest on keyboard event. We implement the @@ -124,7 +126,7 @@

Exercise 8.5

+

Exercise 8.5

We designate the characters as $w $a $s $d. We append the code below to the method SpaceWar>>keyStroke:

diff --git a/docs/Events.html b/docs/Events.html index 9e343a39..11641fd2 100644 --- a/docs/Events.html +++ b/docs/Events.html @@ -1,6 +1,6 @@ - + @@ -83,7 +85,7 @@ Next: , Previous: , Up: The Cuis Book   [Contents][Index]


-

8 Events

+

8 Events

When I used to read fairy tales, I fancied that kind of thing never @@ -94,7 +96,7 @@

8 Events


-

What just happened?

+

What just happened?

We talked above about control flow, how one makes decisions about what to do in making calculations. We talked about this like the entire diff --git a/docs/Explore-OOP-from-the-Browser.html b/docs/Explore-OOP-from-the-Browser.html index 2285cb20..0e5b9b69 100644 --- a/docs/Explore-OOP-from-the-Browser.html +++ b/docs/Explore-OOP-from-the-Browser.html @@ -1,6 +1,6 @@ - + @@ -82,10 +84,10 @@


-

3.2 Explore OOP from the Browser

+

3.2 Explore OOP from the Browser

In Figure 2.1 of the Browser, below the classes pane, there are three buttons:

@@ -103,7 +105,7 @@

3.2 Explore OOP from the -

Below these three buttons, observe the wide text pane, it provides +

Below these three buttons, observe the wide text pane, which provides contextual information on the selected item.

Again, Class methods apply to the Class itself. Instance Methods apply for @@ -114,7 +116,7 @@

3.2 Explore OOP from the Messages like #squared and #abs are sent to any Fraction instance, of which there are many.

-

Up to now we have attempted to be very careful with definitions, but +

Up to now, we have attempted to be very careful with definitions, but you know that when we say “a fraction” we mean “an instance of the class Fraction”. From here our language will be more casual. @@ -126,14 +128,12 @@

3.2 Explore OOP from the Float class is selected, what is the information provided by the text pane?

- -

Exercise 3.1: Float class information

We have spent much time here because it is important to avoid confusion between instance methods and class methods. Let’s consider the Float class as an example.

- +

Class Methods. In Figure 3.1 the methods listed are class side, in the browser the class button is pressed to see this @@ -141,8 +141,7 @@

3.2 Explore OOP from the

ch03-floatClassSide -
-

Figure 3.1: Class methods in Float

+

Figure 3.1: Class methods in Float

From a Workspace, these methods are called with the message name sent directly to the class:

@@ -156,7 +155,7 @@

3.2 Explore OOP from the - +

 note @@ -198,7 +197,7 @@

3.2 Explore OOP from the ⇒ #(2 3 5 7 11 13 17 19) - +

Instance methods. In Figure 3.2, the methods listed are instance side, in the browser the instance button @@ -206,8 +205,7 @@

3.2 Explore OOP from the

ch03-floatInstanceSide -
-

Figure 3.2: Instance methods in Float

+

Figure 3.2: Instance methods in Float

In a Workspace, these methods are called with the message name sent directly to an instance:

@@ -229,7 +227,7 @@

3.2 Explore OOP from the ⇒ MessageNotUnderstood: OrderedCollection class>>add: -

Of course you can mix both class and instance methods, as long as you +

Of course, you can mix both class and instance methods, as long as you send the message to the appropriate class or instance:

@@ -252,7 +250,6 @@

3.2 Explore OOP from the
self rotation: (velocity y arcTan: velocity x) + Float halfPi
 
-

Example 3.2: Aligning a torpedo with its velocity direction

With this brief introduction to the system browser, you are now equipped to explore the system classes. @@ -261,7 +258,7 @@

3.2 Explore OOP from the
diff --git a/docs/FloatPrecision.html b/docs/FloatPrecision.html index 243c092d..93a96b41 100644 --- a/docs/FloatPrecision.html +++ b/docs/FloatPrecision.html @@ -1,6 +1,6 @@ - + @@ -10,15 +10,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 diff --git a/docs/FractionPrecision.html b/docs/FractionPrecision.html index 717d0c13..008316db 100644 --- a/docs/FractionPrecision.html +++ b/docs/FractionPrecision.html @@ -1,6 +1,6 @@ - + @@ -10,15 +10,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 diff --git a/docs/Fun-with-collections.html b/docs/Fun-with-collections.html index 07732824..133eba77 100644 --- a/docs/Fun-with-collections.html +++ b/docs/Fun-with-collections.html @@ -1,6 +1,6 @@ - + @@ -83,14 +85,14 @@ Next: , Previous: , Up: The Collection Way of Life   [Contents][Index]


-

4.3 Fun with collections

+

4.3 Fun with collections

A Collection is a grouping of objects. Arrays and Lists are collections. We already know a String is a collection; precisely a collection of characters. Many kinds of Collection have similar behaviors.

-

An Array is a fixed size collection, and unlike a string it can +

An Array is a fixed-size collection, and unlike a string, it can contain any kind of literal enclosed in #( ):

"array of numbers"
@@ -99,7 +101,7 @@ 

4.3 Fun with collections

#(1 'friend' $& 'al')
-

An Array is constructed directly using well formed literal elements. +

An Array is constructed directly using well-formed literal elements. We will get to the meaning of this last statement when we discuss details of the Smalltalk language.

@@ -110,7 +112,7 @@

4.3 Fun with collections

⇒ #(1 2 #/ 3) - +

Indeed, the $/ is interpreted as a literal symbol and we get basic components of “2 / 3” but this text is not interpreted as a fraction. To get a fraction @@ -123,8 +125,8 @@

4.3 Fun with collections

⇒ #(1 2/3 7.5) - - + +

With an array filled with numbers you can request information and arithmetic operations:

@@ -133,7 +135,7 @@

4.3 Fun with collections

#(1 2 3 4) / 10 ⇒ #(1/10 1/5 3/10 2/5)
- +

Mathematical operations work as well:

#(1 2 3 4) squared ⇒ #(1 4 9 16)
@@ -142,8 +144,8 @@ 

4.3 Fun with collections

0.7071067811865475 0.49999999999999994)
- -

Basic statistical methods can be used directly on array of numbers: + +

Basic statistical methods can be used directly on arrays of numbers:

#(7.5 3.5 8.9) mean ⇒ 6.633333333333333 
@@ -174,12 +176,10 @@ 

4.3 Fun with collections

Create an array of integer numbers ranging from -80 to 50.

- -

Exercise 4.2: Negative integer numbers

- - - + + +

The size of an array is fixed, it can not grow. An OrderedCollection is a dynamic, ordered collection. It grows when adding element with the #add: message: @@ -194,11 +194,10 @@

4.3 Fun with collections

fibo ⇒ an OrderedCollection(1 1 2 3 5 8 13 21) -

Example 4.1: Dynamic size collection

- - - + + +

Index access to the elements of a collection is done with a variety of messages. The index naturally ranges from 1 to the collection size:

@@ -210,11 +209,11 @@

4.3 Fun with collections

-

Playing with enumerators

+

Playing with enumerators

A collection comes with a set of helpful methods named enumerators. Enumerators operate on each element of a collection.

- +

Set operations between two collections are computed with the #union:, #intersection: and #difference: messages.

@@ -226,7 +225,6 @@

Playing with enumerators

-

Example 4.2: Set operations

@@ -234,8 +232,6 @@

Playing with enumeratorsConstruct the array of the numbers 1,...,24,76,...,100.

- -

Exercise 4.3: Hole in a set

Set operations work with any kind of object. Comparing objects deserves its own section. @@ -245,8 +241,8 @@

Playing with enumerators - - + +

To select the prime numbers from 1 to 100, we use the #select: enumerator. This message is sent to a collection, then it will select @@ -258,7 +254,6 @@

Playing with enumerators -

Example 4.3: Select prime numbers between 1 and 100

This example introduces the message #select: and a block of code, a primordial constituent element of the Cuis-Smalltalk model. A block of code, @@ -272,11 +267,11 @@

Playing with enumerators
  • the message #select: is sent to the interval with the block of code as the argument - +
  • in the select: method, for each integer of the interval, the block of code is invoked with its parameter n set to the integer value. A block parameter - starts with a colon, “:”, and is an ordinary identifer 17. Then, each time n + starts with a colon, “:”, and is an ordinary identifier 17. Then, each time n isPrime evaluates to true, the n value is added to a new collection answered when the select: method finished testing each element of the collection. @@ -294,7 +289,7 @@

    Playing with enumeratorsEnumerators implement tremendously powerful ways to process collections without -the need of index. By this we mean that they are simple to get right. +needing an index. By this, we mean that they are simple to get right. We like simple!

    To get an idea of how useful enumerators are, take a browse at the @@ -306,8 +301,6 @@

    Playing with enumeratorsSelect the odd numbers between -20 and 45.

  • - -

    Exercise 4.4: Odd integers

    You want to know the number of prime numbers under 100. Just send the message #size to the answered collection at Example 4.3. The @@ -319,11 +312,10 @@

    Playing with enumerators( (1 to: 100) select: [:n | n isPrime] ) size ⇒ 25 -

    Example 4.4: Quantity of prime numbers between 1 and 100

    For more clarity, we use a variable named primeNumbers to -remember about the prime numbers list we build: +store the prime numbers list we built:

    | primeNumbers |
     primeNumbers := (1 to: 100) select: [:n | n isPrime].
    @@ -336,9 +328,7 @@ 

    Playing with enumeratorsModify Example 4.4 to calculate the number of prime numbers between 101 and 200.

    - - -

    Exercise 4.5: Number of prime number between 101 and +

    Exercise 4.5: Number of prime numbers between 101 and 200

    @@ -346,8 +336,6 @@

    Playing with enumeratorsBuild the list of the multiples of 7 below 100.

    - -

    Exercise 4.6: Multiples of 7

    @@ -355,13 +343,11 @@

    Playing with enumeratorsBuild a collection of the odd integers in [1 ; 100] which are not prime.

    - -

    Exercise 4.7: Odd and non prime integers

    - +

    A sister enumerator to #select: is #collect:. It returns a new collection of the same size, with each element transformed by a -block of code. When searching perfect cubic roots, it is useful to +block of code. When searching for perfect cubic roots, it is useful to know about some cubes:

    @@ -369,7 +355,6 @@

    Playing with enumerators(1 to: 10) collect: [:n | n cubed] ⇒ #(1 8 27 64 125 216 343 512 729 1000)

    -

    Example 4.5: Collect cubes

    The collected elements can be of a different type. Below, a string is enumerated and integers are collected: @@ -379,14 +364,13 @@

    Playing with enumerators -

    We can shift the ascii value, convert back to character then collect -in a new string. It is a simple cipher: +

    We can shift the ASCII value, convert it back to a character, then collect +it in a new string. It is a simple cipher:

    'Bonjour' collect: [:c | (c asciiValue + 1) asCharacter ]
     ⇒ 'Cpokpvs'
     
    -

    Example 4.6: Simple cipher

    @@ -394,11 +378,9 @@

    Playing with enumeratorsWrite the script to decode cipher ’Zpv!bsf!b!cptt’, it was encoded with Example 4.6.

    - -

    Exercise 4.8: Cipher decode

    -

    The Caesar’s cipher is based on shifting letter to the right in the +

    Caesar’s cipher is based on shifting letters to the right in the alphabet order. The method is named after Julius Caesar, who used it in his private correspondence with a shift of 3.

    @@ -406,12 +388,10 @@

    Playing with enumerators

     CuisLogo Write a script -to collect the alphabet upper letters representing the Caesar’s +to collect the alphabet’s uppercase letters representing the Caesar’s cipher. The expected answers is #($D $E $F $G $H $I $J $K $L $M $N $O $P $Q $R $S $T $U $V $W $X $Y $Z $A $B $C).

    - -

    Exercise 4.9: Alphabet Caesar’s cipher

    Once you get the alphabet cipher right, you can encode your first message: @@ -421,8 +401,6 @@

    Playing with enumeratorsEncode the phrase ’SMALLTALKEXPRESSION’.

    - -

    Exercise 4.10: Encode with Caesar’s cipher

    And decode message:

    @@ -431,15 +409,13 @@

    Playing with enumerators CuisLogo Decode this famous quotation attributed to Julius Caesar ’DOHDMDFWDHVW’.

    - -

    Exercise 4.11: Decode with Caesar’s cipher

    -

    Fun with loops

    +

    Fun with loops

    Collection can be iterated with traditional loops: there is a whole family of repeat, while and for loops.

    - - + +

    A simple for loop between two integer values is written with the keyword message #to:do:, the last argument is a block of code executed for each index: @@ -451,25 +427,24 @@

    Fun with loops

    sequence ⇒ an OrderedCollection(1 1/2 1/3 1/4 1/5 1/6 1/7 1/8 1/9 1/10) -

    Example 4.7: A for loop

    - +

    A collect writes more concisely, though:

    (1 to: 10) collect: [:k | 1 / k]
     
    - - + +

    To step with a different value than 1, a third numeric argument is inserted:

    1 to: 10 by: 0.5 do: [:k | sequence add: 1 / k]
     
    - + -

    A repeated loop without index or any collection is written with the +

    A repeated loop without an index or any collection is written with the #timesRepeat: message send to an integer:

    @@ -480,10 +455,9 @@

    Fun with loops

    fibo ⇒ an OrderedCollection(1 1 2 3 5 8 13 21 34 55 89 144)
    -

    Example 4.8: A repeat loop

    - -

    The quotient of consecutive Fibonacci terms converge toward the golden + +

    The quotient of consecutive Fibonacci terms converges toward the golden value:

    fibo pairsDo: [:i :j |
    @@ -504,7 +478,7 @@ 

    Footnotes

    (17)

    An - identifier is just a word that starts in a lower case letter + identifier is just a word that starts in a lowercase letter and consists of upper and lower case letters and decimal digits. All variable names are identifiers

    diff --git a/docs/Fun-with-variables.html b/docs/Fun-with-variables.html index 68b1f9f9..c624374b 100644 --- a/docs/Fun-with-variables.html +++ b/docs/Fun-with-variables.html @@ -1,6 +1,6 @@ - + @@ -82,12 +84,12 @@ Next: , Previous: , Up: The Collection Way of Life   [Contents][Index]


    -

    4.2 Fun with variables

    - - - +

    4.2 Fun with variables

    + + + -

    How a variable can be fun? With Cuis-Smalltalk, a variable is the name of a +

    How can a variable be fun? With Cuis-Smalltalk, a variable is the name of a box that holds a value – an object, that’s it!

    A variable can hold a value of any class. The value is strongly typed @@ -113,13 +115,13 @@

    4.2 Fun with variables

    instance, after some calculation it ends as a SmallInteger instance.

    -

    In fact to be honest, there is no such things as type, it is only +

    In fact, there is no such thing as type, it is only referenced objects which can mutate over time into other kind of object: a metal body structure to which you add two wheels may become a bicycle, or a car if you add four wheels.

    Therefore, to declare a method variable we just name it at the -beginning of the script and surround it by pipe characters “|”. +beginning of the script and surround it with pipe characters “|”.

    A variable always holds a value. Until we place a different value into a variable, the variable holds the nil value, an @@ -127,7 +129,7 @@

    4.2 Fun with variables

    bound to a variable we mean that the named box now holds that value.

    -

    So far we sent messages directly to objects, but we can send message to a +

    So far we sent messages directly to objects, but we can send messages to a variable bound to an object too.

    Any object responds to the message #printString. @@ -148,7 +150,7 @@

    4.2 Fun with variables

    a message to a variable bound to an object, the system does not check ahead of time that the object -understands the message. Nevertheless there is a procedure to catch +understands the message. Nevertheless, there is a procedure to catch this kind of situation when the message is actually sent.

    diff --git a/docs/Going-Vector.html b/docs/Going-Vector.html index 5fe8e19e..7e608922 100644 --- a/docs/Going-Vector.html +++ b/docs/Going-Vector.html @@ -1,6 +1,6 @@ - + @@ -83,7 +85,7 @@ Next: , Up: The Fundamentals of Morph   [Contents][Index]


    -

    7.1 Going Vector

    +

    7.1 Going Vector

    For Cuis-Smalltalk, we built Morphic 3, the third design iteration of these ideas, after Self’s Morphic 1 and Squeak’s Morphic 2. If you already @@ -98,7 +100,7 @@

    7.1 Going Vector

    complexity that was required, especially with regards to geometry.

    -

    7.1.1 A first example

    +

    7.1.1 A first example

    Let’s start with some examples. What we want is to build our own graphic objects, or Morphs. A Morph class is part of the Morph @@ -120,8 +122,8 @@

    7.1.1 A first example

    In method category drawing add:

    - - + +
    LineExampleMorph>>drawOn: aCanvas
        aCanvas strokeWidth: 20 color: Color green do: [
    @@ -141,8 +143,7 @@ 

    7.1.1 A first example

    ch07-01-LineDetails -
    -

    Figure 7.1: Details of our line morph

    +

    Figure 7.1: Details of our line morph

    The code is self evident, the drawOn: method takes a VectorCanvas instance as an argument. VectorCanvas provides many drawing operations for morphs to use. You can play with @@ -160,14 +161,12 @@

    7.1.1 A first example

    line morph so it draws itself as a cross with an extent of 200 pixels?

    - -

    Exercise 7.1: Cross morph

    -

    7.1.2 Morph you can move

    - +

    7.1.2 Morph you can move

    +

    You might have already tried to click and drag on your Line, like you can do with regular windows and most other Morphs. If not, try now. But nothing happens! The reason is that our Morph is fixed in a @@ -181,7 +180,7 @@

    7.1.2 Morph you can move

    and still be able to move it around. The solution is to make it subclass of PlacedMorph, instead of Morph.

    - +

    To do this, first evaluate the code below to get rid of all LineExampleMorph instances:

    @@ -189,7 +188,6 @@

    7.1.2 Morph you can move

    LineExampleMorph allInstancesDo: [ :m | m delete]
     
    -

    Example 7.1: Delete all instances of a given morph

    Then, in the System Browser class declaration for LineExampleMorph, type PlacedMorph instead of Morph and save. Now execute @@ -199,7 +197,7 @@

    7.1.2 Morph you can move

    LineExampleMorph new openInWorld
     
    - +

    You will get a line you can grab with the mouse and move it around. PlacedMorph adds a new instance variable called location. If a morph has a location, it can be @@ -215,7 +213,7 @@

    7.1.2 Morph you can move

    -

    7.1.3 Filled morph

    +

    7.1.3 Filled morph

    Let’s build another morph, to have more fun.

    @@ -237,8 +235,8 @@

    7.1.3 Filled morph

    In the drawing method category add:

    - - + +
    TriangleExampleMorph>>drawOn: aCanvas
        aCanvas strokeWidth: 10 color: borderColor fillColor: fillColor do: [
    @@ -263,8 +261,7 @@ 

    7.1.3 Filled morph

    ch07-02-Triangles -
    -

    Figure 7.2: A variety of triangle morphs, one decorated with its halo and coordinates system

    +

    Figure 7.2: A variety of triangle morphs, one decorated with its halo and coordinates system

    @@ -274,8 +271,6 @@

    7.1.3 Filled morph

    be filled with a random translucent color and surrounded by a thin blue line.

    - -

    Exercise 7.2: Rectangle morph

    As we learnt previously, Morphic gives you additional ways to interact with your morphs. With a three button mouse or a wheel mouse, place @@ -307,7 +302,7 @@

    7.1.3 Filled morph

    and scale are floating point numbers, and thus not limited to integers.

    - +

    To change the center of rotation of a Morph, you override the method rotationCenter accordingly:

    @@ -321,12 +316,12 @@

    7.1.3 Filled morph

    -

    7.1.4 Animated morph

    - +

    7.1.4 Animated morph

    +

    Let’s add two methods to our TriangleExampleMorph to make our triangle alive:

    - +

    In the method category stepping define:

    TriangleExampleMorph>>wantsSteps
    @@ -352,7 +347,7 @@ 

    7.1.4 Animated morph

    ...and:

    - +
    TriangleExampleMorph>>step
    @@ -369,7 +364,7 @@ 

    7.1.4 Animated morph

    Now try this:

    - +
    TriangleExampleMorph>>step
    @@ -418,13 +413,12 @@ 

    7.1.4 Animated morph

    ch07-03-AnimatedMorph -
    -

    Figure 7.3: Animated morph

    +

    Figure 7.3: Animated morph

    -

    7.1.5 Morph in morph

    - +

    7.1.5 Morph in morph

    +

    Now, let’s try something different. Grab one of your LineExampleMorph. With the halo, zoom it until it is about the @@ -450,7 +444,7 @@

    7.1.5 Morph in morph

    again. Now add the following method to category geometry testing of the class LineExampleMorph:

    - +
    LineExampleMorph>>clipsSubmorphs
    @@ -463,8 +457,7 @@ 

    7.1.5 Morph in morph

    ch07-04-AnimatedAndClippedSubmorph -
    -

    Figure 7.4: An animated and clipped submorph +

    Figure 7.4: An animated and clipped submorph triangle

    diff --git a/docs/Golden-Rules-of-the-Smalltalk-Guild.html b/docs/Golden-Rules-of-the-Smalltalk-Guild.html index ec9e73a0..a7e3e495 100644 --- a/docs/Golden-Rules-of-the-Smalltalk-Guild.html +++ b/docs/Golden-Rules-of-the-Smalltalk-Guild.html @@ -1,6 +1,6 @@ - + @@ -80,7 +82,7 @@ Next: , Up: Sharing Cuis   [Contents][Index]


    -

    11.1 Golden Rules of the Smalltalk Guild

    +

    11.1 Golden Rules of the Smalltalk Guild

    Basic questions, that appear to be the golden rules of the Smalltalk intergalactic guild29: diff --git a/docs/Halt_0021.html b/docs/Halt_0021.html index e52583f2..1d138346 100644 --- a/docs/Halt_0021.html +++ b/docs/Halt_0021.html @@ -1,6 +1,6 @@ - + @@ -83,9 +85,9 @@ Previous: , Up: Debug and Exception Handling   [Contents][Index]


    -

    10.3 Halt!

    +

    10.3 Halt!

    - +

    A breakpoint is a place in code where one wishes to pause code @@ -107,7 +109,6 @@

    10.3 Halt!

    childrenDo: [ :f | fileNames add: f name. fileNames halt ]. fileNames asArray. -

    Example 10.4: Halt: Set a Breakpoint

     note @@ -120,14 +121,12 @@

    10.3 Halt!

    ch10-06-Halt -
    -

    Figure 10.6: Halt

    +

    Figure 10.6: Halt

    Press Over twice to step over the breakpoint.

    ch10-07-Over -
    -

    Figure 10.7: Step Over Breakpoint

    +

    Figure 10.7: Step Over Breakpoint

    Well, this looks familiar. I know what to do here.

    Note that the halt is inside a loop. While in the loop, each diff --git a/docs/Historical-Context.html b/docs/Historical-Context.html index ac81f927..b9b9ac42 100644 --- a/docs/Historical-Context.html +++ b/docs/Historical-Context.html @@ -1,6 +1,6 @@ - + @@ -79,7 +81,7 @@ Next: , Up: Beginnings   [Contents][Index]


    -

    1.1 Historical Context

    +

    1.1 Historical Context

    One major idea in software is that programming is merely giving a computer a set of instructions to solve some problem. In this point diff --git a/docs/Indexes.html b/docs/Indexes.html index f9ec9242..dad5d278 100644 --- a/docs/Indexes.html +++ b/docs/Indexes.html @@ -1,6 +1,6 @@ - + @@ -85,7 +89,7 @@ Previous: , Up: The Cuis Book   [Contents][Index]


    -

    Appendix H Conceptual index

    +

    Appendix H Conceptual index

    Jump to:   .   @@ -134,370 +138,393 @@

    Appendix H Conceptual index

     
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Index Entry  Section

    .
    .pck.st: Source Code File
    .st: Source Code File

    A
    Array: Fun with collections
    array, dynamic: Fun with collections
    array, operation: Fun with collections
    array, size: Fun with collections
    array, statistic: Fun with collections
    Array: Collections detailed
    array, static: Summary of Syntax
    array, dynamic: Summary of Syntax

    B
    backtick: Back to Spacewar! Morphs
    bits shifting: Kernel-Numbers
    block: Fun with collections
    block, parameter: Fun with collections
    block: Block syntax
    block, parameter: Block syntax
    block, local variable: Block syntax
    block, assigned to a variable: Block syntax
    block, ensure:: Inspecting the Unexpected
    block: Summary of Syntax
    boolean: Control flow with block and message
    browser: A brief introduction to the system Browser
    browser, class category: A brief introduction to the system Browser
    browser, invoke from Workspace: A brief introduction to the system Browser
    browser, class category (new): Spacewar! models
    browser, hierarchy: String -- a particular collection
    browser, protocol: String -- a particular collection

    C
    Caesar cipher: Fun with collections
    cascade of messages: Message send definitions
    cascade of messages: Summary of Syntax
    change log: The Change Log
    change set: The Change Set
    character, ascii: Message to string entities
    character, Unicode: Message to string entities
    character: Kernel-Text
    character: Summary of Syntax
    class: Communicating entities
    class, category: A brief introduction to the system Browser
    class, declaration: A brief introduction to the system Browser
    class, comment: A brief introduction to the system Browser
    class, category: A brief introduction to the system Browser
    class, category (new): Spacewar! models
    class, create (new): Spacewar! models
    class: Understanding Object Oriented Programming
    class, inheritance: Understanding Object Oriented Programming
    class, method: Understanding Object Oriented Programming
    class, inheritance: String -- a particular collection
    class, protocol: String -- a particular collection
    class, category: String -- a particular collection
    class, abstract: Collections detailed
    class, instance variable: Back to Spacewar! Morphs
    class, initialize: Back to Spacewar! Morphs
    class, class: Back to Spacewar! Morphs
    class, variable: Back to Spacewar! Morphs
    class, category: The Package
    collection, inject:into:: Communicating entities
    collection, shuffled: Message to string entities
    collection, squared: Fun with collections
    collection, dynamic: Fun with collections
    collection, OrderedCollection: Fun with collections
    collection, add:: Fun with collections
    collection, at:: Fun with collections
    collection, last: Fun with collections
    collection, indexOf:: Fun with collections
    collection, set operations (union, intersection, difference): Fun with collections
    collection, select:: Fun with collections
    collection, enumerator mechanism: Fun with collections
    collection, collect:: Fun with collections
    collection, collect:: Fun with collections
    collection, pairsDo:: Fun with collections
    collection: Collections detailed
    collection, fixed size: Collections detailed
    collection, instantiate array: Collections detailed
    collection, access element: Collections detailed
    collection, variable size: Collections detailed
    collection, instantiate variable size array: Collections detailed
    collection, Set: Collections detailed
    collection, convert: Collections detailed
    collection, Dictionary: Collections detailed
    command line option, -s (run a script): Daily Workflow
    comment: Summary of Syntax
    control flow: Control flow with block and message
    control flow, test: Control flow with block and message
    control flow, loop: Control flow with block and message
    coordinates: Spacewar! States and Behaviors

    D
    Dictionary: Collections detailed

    E
    event, testing: Building your specialized Morph
    event, handling: Building your specialized Morph
    event, classes: System Events
    event, testing: Overall Mechanism
    event, handling: Overall Mechanism
    event, mouse: Spacewar! Events
    event, testing, mouse over: Spacewar! Events
    event, handling, mouse enter: Spacewar! Events
    event, handling, mouse-enter: Spacewar! Events
    event, keyboard: Spacewar! Events
    event, testing, keyboard: Spacewar! Events
    event, handling, keyboard: Spacewar! Events
    exception: Inspecting the Unexpected
    execution stack: The Debugger

    F
    false: Pseudo-variables
    Fibonacci sequence: Fun with collections
    file: The Debugger
    file extension, .st: Source Code File
    file extension, .st.pck: Source Code File
    float (see number): Summary of Syntax

    G
    garbage collection: Communicating entities

    H
    halt: Halt!

    I
    initialize: Spacewar! States and Behaviors
    instance: Communicating entities
    instance: Understanding Object Oriented Programming
    instance, creation: Understanding Object Oriented Programming
    instance, method: Understanding Object Oriented Programming
    instance variable: Understanding Object Oriented Programming
    integer (see number): Summary of Syntax
    Interval: Kernel-Numbers

    K
    keyboard shortcut, select all code (Ctrl-a): Writing your first scripts
    keyboard shortcut, executing code (Ctrl-d): Writing your first scripts
    keyboard shortcut, execute and print result (Ctrl-p): Writing your first scripts
    keyboard shortcut, find a class (Ctrl-f): A brief introduction to the system Browser
    keyboard shortcut, browse a class (Ctrl-b): A brief introduction to the system Browser
    keyboard shortcut, save code (Ctrl-s): Spacewar! models
    keyboard shortcut, implementors of (Ctrl-m): Understanding Object Oriented Programming
    keyboard shortcut, code completion (tab): Explore OOP from the Browser
    keyboard shortcut, browse protocol (Ctrl-p): String -- a particular collection
    keyboard shortcut, browse hierarchy (Ctrl-h): String -- a particular collection

    L
    literal, number: Writing your first scripts
    loop, for: Kernel-Numbers
    loop, for, step: Kernel-Numbers
    loop, repeat: Kernel-Numbers
    loop, for: Fun with collections
    loop, for, step: Fun with collections
    loop, repeat: Fun with collections
    loop: Control flow with block and message

    M
    message, sender: Communicating entities
    message, receiver: Communicating entities
    message, send: Message send definitions
    message, unary: Message send definitions
    message, binary: Message send definitions
    message, keyword: Message send definitions
    message, precedence: Message send definitions
    message, cascade: Message send definitions
    message, composition: Message to string entities
    message, setter: Spacewar! States and Behaviors
    message, getter: Spacewar! States and Behaviors
    message, unary: Summary of Syntax
    message, binary: Summary of Syntax
    message, keyword: Summary of Syntax
    method: Communicating entities
    method, category: A brief introduction to the system Browser
    method, instance method: A brief introduction to the system Browser
    method, class method: Understanding Object Oriented Programming
    method, instance method: Understanding Object Oriented Programming
    method, returned value (explicit): Understanding Object Oriented Programming
    method, overriding: Understanding Object Oriented Programming
    method, returned value (implicit): Understanding Object Oriented Programming
    method, class method: Explore OOP from the Browser
    method, instance method: Explore OOP from the Browser
    method, category: Kernel-Numbers
    method, category: Kernel-Text
    method, variable: Fun with variables
    method: Method syntax
    method, creating: Spacewar!'s methods
    moprh, legacy: The Fundamentals of Morph
    morph, ellipse: Ellipse Morph
    morph, halo: Ellipse Morph
    morph, submorph: Submorph
    morph, rectangle: Submorph
    morph, properties: A brief introduction to Inspectors
    morph, move/pick up: A brief introduction to Inspectors
    morph, subclass: Building your specialized Morph
    morph, vector, line drawing: Going Vector
    morph, drawOn:: Going Vector
    morph, movable: Going Vector
    morph, delete: Going Vector
    morph, location: Going Vector
    morph, vector, filling area: Going Vector
    morph, drawOn:: Going Vector
    morph, rotationCenter: Going Vector
    morph, animated: Going Vector
    morph, step,wantsSteps: Going Vector
    morph, morphPosition: Going Vector
    morph, rotateBy:: Going Vector
    morph, submorph: Going Vector
    morph, clipsSubmorphs: Going Vector
    morph, drawOn:: A Clock Morph
    morph, drawOn:: Back to Spacewar! Morphs
    morph, rotation:: Back to Spacewar! Morphs
    morph, location: Back to Spacewar! Morphs
    morph, world: Daily Workflow
    mouse: Spacewar! Events

    N
    nil: Pseudo-variables
    number, integer: Writing your first scripts
    number, rational (fraction): Writing your first scripts
    number, integer, roman: Writing your first scripts
    number, integer, as words: Writing your first scripts
    number, integer, base: Writing your first scripts
    number, literal: Writing your first scripts
    number, root: Messages to number entities
    number, sqrt: Messages to number entities
    number, squared: Messages to number entities
    number, rational (fraction), operations: Messages to number entities
    number, decimal division: Messages to number entities
    number, integer, division: Messages to number entities
    number, integer, division reminder: Messages to number entities
    number, integer, odd: Messages to number entities
    number, integer, even: Messages to number entities
    number, integer, isPrime: Messages to number entities
    number, integer, isDivisibleBy:: Messages to number entities
    number, integer, gcd: (great common divisor): Messages to number entities
    number, integer, lcm: (lest common multiple): Messages to number entities
    number, rational (fraction): Understanding Object Oriented Programming
    number, squared: Understanding Object Oriented Programming
    number, abs: Understanding Object Oriented Programming
    number, roundTo:: Kernel-Numbers
    number, roundUpTo:: Kernel-Numbers
    number, to:do:: Kernel-Numbers
    number, to:do:by: Kernel-Numbers
    number, integer, timesRepeat:: Kernel-Numbers
    number, integer, atRandom: Kernel-Numbers
    number, interval: Kernel-Numbers
    number, to:: Kernel-Numbers
    number, to:by:: Kernel-Numbers
    number, integer, base: Kernel-Numbers
    number, decimal: Kernel-Numbers
    number, rational (fraction): Kernel-Numbers
    number, convertion: Kernel-Numbers
    number, to:do: Fun with collections
    number, to:do:by:: Fun with collections
    number, integer, atRandom: Block syntax
    number, integer, atRandom: Back to Spacewar! Morphs
    number, integer: Summary of Syntax
    number, float: Summary of Syntax

    O
    OrderedCollection: Collections detailed
    overriding: Understanding Object Oriented Programming
    overriding: Spacewar! Morphs

    P
    package, create (new): Spacewar! models
    package, save: Spacewar! models
    package, tool: Spacewar! models
    package, load, by graphic interface: Spacewar! models
    package, load, by code: Installing a Package
    package: The Package
    package, requirement: The Package
    package, prefix: The Package
    package, system extension: The Package
    Point: Spacewar! States and Behaviors
    polymorphism: Understanding Object Oriented Programming
    polymorphism: Understanding Object Oriented Programming
    primitive: Summary of Syntax
    protocol: String -- a particular collection
    pseudo-variable, true: Pseudo-variables
    pseudo-variable, false: Pseudo-variables
    pseudo-variable, self: Pseudo-variables
    pseudo-variable, super: Pseudo-variables
    pseudo-variable, nil: Pseudo-variables
    pseudo-variable, thisContext: Pseudo-variables
    pseudo-variables: Pseudo-variables

    R
    receiver: Summary of Syntax
    refactoring: Spacewar! Morphs
    refactoring: Refactoring to Improve Understanding
    returned value: Preface
    returned value: Understanding Object Oriented Programming
    returned value: Summary of Syntax

    S
    selector: Understanding Object Oriented Programming
    self: Pseudo-variables
    self: Pseudo-variables
    sequence: Summary of Syntax
    Set: Collections detailed
    start-up script: Daily Workflow
    string: Writing your first scripts
    string, capitalized: Writing your first scripts
    string, asUppercase: Writing your first scripts
    string, concatenate: Writing your first scripts
    string, character access: Message to string entities
    string, Unicode: Message to string entities
    string, indexOf:: Message to string entities
    string, at:put:: Message to string entities
    string, shuffled: Message to string entities
    string, asArray: Message to string entities
    string, sorted: Message to string entities
    string: Kernel-Text
    string, Unicode: String -- a particular collection
    string, file entry: The Debugger
    string: Summary of Syntax
    subclass: Understanding Object Oriented Programming
    super: Spacewar! States and Behaviors
    super: Pseudo-variables
    superclass: Understanding Object Oriented Programming
    symbol: String -- a particular collection
    symbol: Summary of Syntax

    T
    test: Control flow with block and message
    thisContext: Pseudo-variables
    tools, workspace: Installing and configuring Cuis-Smalltalk
    tools, transcript: Writing your first scripts
    tools, system browser: A brief introduction to the system Browser
    tools, inspector: A brief introduction to Inspectors
    tools, lost changes: The Change Log
    tools, recent changes: The Change Log
    tools, debugger: The Debugger
    tools, debugger, breakpoint: Halt!
    true: Pseudo-variables

    U
    Unicode: Message to string entities
    Unicode: Message to string entities
    Unicode: String -- a particular collection

    V
    variable, assignment: Preface
    variable, instance: Understanding Object Oriented Programming
    variable, assignment: Spacewar! States and Behaviors
    variable, :=: Spacewar! States and Behaviors
    variable, ←: Spacewar! States and Behaviors
    variable: Fun with variables
    variable, method: Fun with variables
    variable, class instance: Back to Spacewar! Morphs
    variable, class: Back to Spacewar! Morphs
    variable, local: Summary of Syntax
    variable, shared: Summary of Syntax
    variable, local, declaration: Summary of Syntax
    variable, assignment: Summary of Syntax

    Y
    yourself: Message to string entities

    Index EntrySection

    .
    .pck.stSource Code File
    .stSource Code File

    A
    ArrayFun with collections
    ArrayCollections detailed
    dynamicFun with collections
    dynamicSummary of Syntax
    operationFun with collections
    sizeFun with collections
    staticSummary of Syntax
    statisticFun with collections
    assignment, See variable

    B
    backtickBack to Spacewar! Morphs
    bits shiftingKernel-Numbers
    blockFun with collections
    blockBlock syntax
    blockSummary of Syntax
    assigned to a variableBlock syntax
    ensure:Inspecting the Unexpected
    local variableBlock syntax
    parameterFun with collections
    parameterBlock syntax
    booleanControl flow with block and message
    breakpoint, See Tools, debugger
    browserA brief introduction to the system Browser
    class categoryA brief introduction to the system Browser
    class category (new)Spacewar! models
    hierarchyString -- a particular collection
    invoke from WorkspaceA brief introduction to the system Browser
    protocolString -- a particular collection

    C
    Caesar cipherFun with collections
    cascade of messagesMessage send definitions
    cascade of messagesSummary of Syntax
    change logThe Change Log
    change setThe Change Set
    characterKernel-Text
    characterSummary of Syntax
    asciiMessage to string entities
    UnicodeMessage to string entities
    classCommunicating entities
    classUnderstanding Object Oriented Programming
    abstractCollections detailed
    categoryA brief introduction to the system Browser
    categoryA brief introduction to the system Browser
    categoryString -- a particular collection
    categoryThe Package
    category (new)Spacewar! models
    classBack to Spacewar! Morphs
    commentA brief introduction to the system Browser
    create (new)Spacewar! models
    declarationA brief introduction to the system Browser
    inheritanceUnderstanding Object Oriented Programming
    inheritanceString -- a particular collection
    initializeBack to Spacewar! Morphs
    instance variableBack to Spacewar! Morphs
    methodUnderstanding Object Oriented Programming
    protocolString -- a particular collection
    variableBack to Spacewar! Morphs
    collectionCollections detailed
    access elementCollections detailed
    add:Fun with collections
    at:Fun with collections
    collect:Fun with collections
    collect:Fun with collections
    convertCollections detailed
    DictionaryCollections detailed
    dynamicFun with collections
    enumerator mechanismFun with collections
    fixed sizeCollections detailed
    indexOf:Fun with collections
    inject:into:Communicating entities
    instantiate arrayCollections detailed
    instantiate variable size arrayCollections detailed
    lastFun with collections
    OrderedCollectionFun with collections
    pairsDo:Fun with collections
    select:Fun with collections
    SetCollections detailed
    set operations (union, intersection, difference)Fun with collections
    shuffledMessage to string entities
    squaredFun with collections
    variable sizeCollections detailed
    command line option
    -s (run a script)Daily Workflow
    commentSummary of Syntax
    control flowControl flow with block and message
    loopControl flow with block and message
    testControl flow with block and message
    coordinatesSpacewar! States and Behaviors

    D
    debugger, See tools
    DictionaryCollections detailed

    E
    event
    classesSystem Events
    handlingBuilding your specialized Morph
    handlingOverall Mechanism
    keyboardSpacewar! Events
    mouse enterSpacewar! Events
    mouse-enterSpacewar! Events
    keyboardSpacewar! Events
    mouseSpacewar! Events
    testingBuilding your specialized Morph
    testingOverall Mechanism
    keyboardSpacewar! Events
    mouse overSpacewar! Events
    exceptionInspecting the Unexpected
    execution stackThe Debugger

    F
    falsePseudo-variables
    Fibonacci sequenceFun with collections
    fileThe Debugger
    file extension
    .stSource Code File
    .st.pckSource Code File
    float (see number)Summary of Syntax
    for loop, See loop
    fraction, See number

    G
    garbage collectionCommunicating entities

    H
    haltHalt!

    I
    initializeSpacewar! States and Behaviors
    inspector, See tools
    instanceCommunicating entities
    instanceUnderstanding Object Oriented Programming
    creationUnderstanding Object Oriented Programming
    methodUnderstanding Object Oriented Programming
    instance variableUnderstanding Object Oriented Programming
    integer (see number)Summary of Syntax
    interger, See number
    IntervalKernel-Numbers

    K
    keyboard shortcut
    browse a class (Ctrl-b)A brief introduction to the system Browser
    browse hierarchy (Ctrl-h)String -- a particular collection
    browse protocol (Ctrl-p)String -- a particular collection
    code completion (tab)Explore OOP from the Browser
    execute and print result (Ctrl-p)Writing your first scripts
    executing code (Ctrl-d)Writing your first scripts
    find a class (Ctrl-f)A brief introduction to the system Browser
    implementors of (Ctrl-m)Understanding Object Oriented Programming
    save code (Ctrl-s)Spacewar! models
    select all code (Ctrl-a)Writing your first scripts

    L
    literal
    numberWriting your first scripts
    loopControl flow with block and message
    forKernel-Numbers
    forFun with collections
    stepKernel-Numbers
    stepFun with collections
    repeatKernel-Numbers
    repeatFun with collections

    M
    message
    binaryMessage send definitions
    binarySummary of Syntax
    cascadeMessage send definitions
    compositionMessage to string entities
    getterSpacewar! States and Behaviors
    keywordMessage send definitions
    keywordSummary of Syntax
    precedenceMessage send definitions
    receiverCommunicating entities
    sendMessage send definitions
    senderCommunicating entities
    setterSpacewar! States and Behaviors
    unaryMessage send definitions
    unarySummary of Syntax
    methodCommunicating entities
    methodMethod syntax
    categoryA brief introduction to the system Browser
    categoryKernel-Numbers
    categoryKernel-Text
    class methodUnderstanding Object Oriented Programming
    class methodExplore OOP from the Browser
    creatingSpacewar!'s methods
    instance methodA brief introduction to the system Browser
    instance methodUnderstanding Object Oriented Programming
    instance methodExplore OOP from the Browser
    overridingUnderstanding Object Oriented Programming
    returned value (explicit)Understanding Object Oriented Programming
    returned value (implicit)Understanding Object Oriented Programming
    variableFun with variables
    moprh
    legacyThe Fundamentals of Morph
    morph
    animatedGoing Vector
    clipsSubmorphsGoing Vector
    deleteGoing Vector
    drawOn:Going Vector
    drawOn:Going Vector
    drawOn:A Clock Morph
    drawOn:Back to Spacewar! Morphs
    ellipseEllipse Morph
    haloEllipse Morph
    locationGoing Vector
    locationBack to Spacewar! Morphs
    morphPositionGoing Vector
    movableGoing Vector
    move/pick upA brief introduction to Inspectors
    propertiesA brief introduction to Inspectors
    rectangleSubmorph
    rotateBy:Going Vector
    rotation:Back to Spacewar! Morphs
    rotationCenterGoing Vector
    step,wantsStepsGoing Vector
    subclassBuilding your specialized Morph
    submorphSubmorph
    submorphGoing Vector
    vector
    filling areaGoing Vector
    line drawingGoing Vector
    worldDaily Workflow
    mouseSpacewar! Events

    N
    nilPseudo-variables
    number
    absUnderstanding Object Oriented Programming
    conversionKernel-Numbers
    decimalKernel-Numbers
    decimal divisionMessages to number entities
    floatSummary of Syntax
    integerWriting your first scripts
    integerSummary of Syntax
    as wordsWriting your first scripts
    atRandomKernel-Numbers
    atRandomBlock syntax
    atRandomBack to Spacewar! Morphs
    baseWriting your first scripts
    baseKernel-Numbers
    divisionMessages to number entities
    division reminderMessages to number entities
    evenMessages to number entities
    gcd: (great common divisor)Messages to number entities
    isDivisibleBy:Messages to number entities
    isPrimeMessages to number entities
    lcm: (least common multiple)Messages to number entities
    oddMessages to number entities
    romanWriting your first scripts
    timesRepeat:Kernel-Numbers
    intervalKernel-Numbers
    literalWriting your first scripts
    rational (fraction)Writing your first scripts
    rational (fraction)Understanding Object Oriented Programming
    rational (fraction)Kernel-Numbers
    operationsMessages to number entities
    rootMessages to number entities
    roundTo:Kernel-Numbers
    roundUpTo:Kernel-Numbers
    sqrtMessages to number entities
    squaredMessages to number entities
    squaredUnderstanding Object Oriented Programming
    to:Kernel-Numbers
    to:by:Kernel-Numbers
    to:doFun with collections
    to:do:Kernel-Numbers
    to:do:byKernel-Numbers
    to:do:by:Fun with collections

    O
    OrderedCollectionCollections detailed
    overridingUnderstanding Object Oriented Programming
    overridingSpacewar! Morphs

    P
    packageThe Package
    create (new)Spacewar! models
    load
    by codeInstalling a Package
    by graphic interfaceSpacewar! models
    prefixThe Package
    requirementThe Package
    saveSpacewar! models
    system extensionThe Package
    toolSpacewar! models
    PointSpacewar! States and Behaviors
    polymorphismUnderstanding Object Oriented Programming
    polymorphismUnderstanding Object Oriented Programming
    primitiveSummary of Syntax
    protocolString -- a particular collection
    pseudo-variable
    falsePseudo-variables
    nilPseudo-variables
    selfPseudo-variables
    superPseudo-variables
    thisContextPseudo-variables
    truePseudo-variables
    pseudo-variablesPseudo-variables

    R
    rational (fraction), See number
    receiverSummary of Syntax
    refactoringSpacewar! Morphs
    refactoringRefactoring to Improve Understanding
    repeat, See loop
    returned valuePreface
    returned valueUnderstanding Object Oriented Programming
    returned valueSummary of Syntax

    S
    selectorUnderstanding Object Oriented Programming
    selfPseudo-variables
    selfPseudo-variables
    sequenceSummary of Syntax
    SetCollections detailed
    shortcut, See keyboard shortcut
    start-up scriptDaily Workflow
    stringWriting your first scripts
    stringKernel-Text
    stringSummary of Syntax
    asArrayMessage to string entities
    asUppercaseWriting your first scripts
    at:put:Message to string entities
    capitalizedWriting your first scripts
    character accessMessage to string entities
    concatenateWriting your first scripts
    file entryThe Debugger
    indexOf:Message to string entities
    shuffledMessage to string entities
    sortedMessage to string entities
    UnicodeMessage to string entities
    UnicodeString -- a particular collection
    subclassUnderstanding Object Oriented Programming
    superSpacewar! States and Behaviors
    superPseudo-variables
    superclassUnderstanding Object Oriented Programming
    symbolString -- a particular collection
    symbolSummary of Syntax

    T
    testControl flow with block and message
    thisContextPseudo-variables
    tools
    debuggerThe Debugger
    breakpointHalt!
    inspectorA brief introduction to Inspectors
    lost changesThe Change Log
    recent changesThe Change Log
    system browserA brief introduction to the system Browser
    transcriptWriting your first scripts
    workspaceInstalling and configuring Cuis-Smalltalk
    truePseudo-variables

    U
    UnicodeMessage to string entities
    UnicodeMessage to string entities
    UnicodeString -- a particular collection

    V
    variableFun with variables
    :=Spacewar! States and Behaviors
    Spacewar! States and Behaviors
    assignmentPreface
    assignmentSpacewar! States and Behaviors
    assignmentSummary of Syntax
    classBack to Spacewar! Morphs
    class instanceBack to Spacewar! Morphs
    instanceUnderstanding Object Oriented Programming
    localSummary of Syntax
    declarationSummary of Syntax
    methodFun with variables
    sharedSummary of Syntax

    Y
    yourselfMessage to string entities