[squeak-dev] The Trunk: EToys-dtl.33.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] The Trunk: EToys-dtl.33.mcz

commits-2
David T. Lewis uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-dtl.33.mcz

==================== Summary ====================

Name: EToys-dtl.33
Author: dtl
Time: 29 August 2009, 3:13:02 am
UUID: ee8177c9-07c7-4148-bc75-76cd2f1b26f7
Ancestors: EToys-ar.32

Use #identityHash rather than #asOop in #printOn: methods

=============== Diff against EToys-ar.32 ===============

Item was changed:
  ----- Method: Player>>printOn: (in category 'printing') -----
  printOn: aStream
  super printOn: aStream.
+ aStream nextPutAll: (' (', self identityHash printString, ')').
- aStream nextPutAll: (' (', self asOop printString, ')').
  self costume ifNil: [aStream nextPutAll: ' (with nil costume)'.  ^ self].
  aStream nextPutAll: ' named ', self externalName!

Item was changed:
  ----- Method: Presenter>>printOn: (in category 'printing') -----
  printOn: aStream
  super printOn: aStream.
+ aStream nextPutAll: ' (', self identityHash printString, ')'!
- aStream nextPutAll: ' (', self asOop printString, ')'!

Item was changed:
  RectangleMorph subclass: #TileMorph
  instanceVariableNames: 'type slotName literal operatorOrExpression actualObject downArrow upArrow suffixArrow typeColor lastArrowTick nArrowTicks operatorReadoutString possessive retractArrow vocabulary vocabularySymbol'
+ classVariableNames: 'DownPicture RetractPicture SuffixArrowAllowance SuffixPicture UpArrowAllowance UpPicture UpdatingOperators'
- classVariableNames: 'SuffixPicture UpdatingOperators RetractPicture UpArrowAllowance DownPicture SuffixArrowAllowance UpPicture'
  poolDictionaries: ''
  category: 'EToys-Scripting Tiles'!
 
  !TileMorph commentStamp: '<historical>' prior: 0!
  A tile with up, down and suffix arrows.
 
  To install new Forms for the arrows, just nil out UpPicture, DownPicture,
  or SuffixPicture.
  Create actors with the picture you want and write it out with these file names:
  'tile inc arrow.morph' 'tile dec arrow.morph' 'tile suffix
  arrow.morph'.  Make sure that file is in the same directory as the image.
  Open an EToy.!

Item was changed:
  UpdatingThreePhaseButtonMorph subclass: #EtoyUpdatingThreePhaseButtonMorph
  instanceVariableNames: ''
+ classVariableNames: 'CheckedForm MouseDownForm UncheckedForm'
- classVariableNames: 'CheckedForm UncheckedForm MouseDownForm'
  poolDictionaries: ''
  category: 'EToys-Widgets'!
 
  !EtoyUpdatingThreePhaseButtonMorph commentStamp: '<historical>' prior: 0!
  A slight variation wherein the actionSelector and getSelector both take argument(s).!

Item was changed:
  AlignmentMorph subclass: #SyntaxMorph
  instanceVariableNames: 'parseNode markerMorph'
+ classVariableNames: 'AllSpecs ContrastFactor DownRightArrow SelfTile SizeScaleFactor'
- classVariableNames: 'ContrastFactor SizeScaleFactor AllSpecs DownRightArrow SelfTile'
  poolDictionaries: ''
  category: 'EToys-Tile Scriptors'!
 
  !SyntaxMorph commentStamp: '<historical>' prior: 0!
  A single class of morph that holds any piece of Smalltalk syntax, and allows it to be a tile.  Tiles can be dragged in or out of a method.
 
  In the message list pane of a Browser, choose 'tile scriptor'.  Bring up a second one to steal parts from.  If you use a Protocol Browser, and choose tiles, there will be two buttons that bring up menus with many tiles on them.
 
  Clicking multiple times selects enclosing phrases of code.  Dragging lets you take away a copy.  Any tile may be replaced by dropping on it.  Shift-click to edit the text of any tile.  Change variable and message names, but do not change the part-of-speech (objects to selector).
 
  Each SyntaxMorph holds a ParseNode.  After editing, the parseNode is only good as a part-of-speech indicator.  Only the Class of a parseNode is important.  It's state is not kept up to date with the tile edits (but maybe it should be).  (For MessageNodes, whether the receiver slot is nil is significant.)
 
  The correspondence between SyntaxMorphs and parseNodes in the real parse tree is not one-to-one.  Several extra levels of SyntaxMorph were added as aligners to make the horizontal and vertical layout right.  These sometimes have nil for the parseNode.
 
  When accept the method, we pass over the tree of SyntaxMorphs, gathering their printStrings and inserting punctuation.  See (SyntaxMorph>>printOn:indent:).  We send the result to the compiler.  (We do not use the parse tree we already have.)
 
  To turn on type checking:
  Preferences enable: #eToyFriendly
  or for testing:     World project projectParameters at: #fullCheck put: true.
 
  Colors of tiles:  Each tile has a current color (inst car color) and a deselectedColor (a property).  The deselectedColor may be governed by the part of speech, or not.  (translateColor: is only used when a tile is created, to set deselectedColor.)  From deselectedColor (set by #setDeselectedColor), the color changes to:
  lightBrown when selected (not the submorphs) in #select
  translucent when held in the hand (allMorphs) in #lookTranslucent
  green when a drop target (allMorphs) (change the owners back) #dropColor,
  #trackDropZones
  deselectedColor is moderated by the darkness setting, #scaleColorByUserPref:.  (as it is put into color in #color:)
 
  Code to produce an individual tile is:
  (SyntaxMorph new) attachTileForCode: '''abc''' nodeType: LiteralNode.
  see offerTilesMenuFor:in: for many other phrases that produce useful tiles.
 
  AssignmentNode:  If three submorphs, is a statement, and is a noun.  If one submorph, is just the left arrow.  When dropped on a variable, it creates a new assignment statement. !