Squeak Class Documentation category index | class index  
 
SyntaxMorph
  category: Morphic-Tile Scriptors
  superclass: AlignmentMorph
  subclasses:

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.

instance methods
  accessing
  actualObject
argumentNodes
cleanUpString:
color:
dissectMessage
editor
enclosingPane
externalName
fillStyle:
getCurrentValue
messageNode
parseNode
parseNode:
parsedInClass
parsedInClass:
readOut
receiverNode
receiverObject
rename:
selector
unSpaceAndUpShift:appending:
userScriptSelector
userScriptSelector:

  alans styles
  aSimpleStringMorphWith:
alansCurrentFontPreference
alansTemplateStyleFor:
anUpdatingStringMorphWith:special:
constructSelfVariant:and:
darkerColor
fontToUseForSpecialWord:
lighterColor
noiseBeforeBlockArg
noiseStringMorph:
noiseWordBeforeVariableNode:string:
setConditionalPartStyle
setSpecialOuterTestFormat
setSpecialTempDeclarationFormat1
setSpecialTempDeclarationFormat2
shouldBeBrokenIntoWords:
specialColor:andBorder:
splitAtCapsAndDownshifted:
standardCellPositioning
standardInset
substituteKeywordFor:
tokenVerticalSeparator
translateFromWordySelfVariant:
translateToWordyGetter:
translateToWordySelfVariant:
translateToWordySetter:

  card & stack
  couldHoldSeparateDataForEachInstance
currentDataValue
putOnBackground
setNewContentsFrom:
setTarget:
variableDocks

  debugging
  balloonText
debugger
debugger:
hostContext
update:

  drawing
  drawOn:
lookTranslucent

  dropping/grabbing
  acceptDroppingMorph:event:
cleanupAfterItDroppedOnMe
justDroppedInto:event:
morphToDropInPasteUp:
structureMatchWith:
wantsDroppedMorph:event:

  event handling
  cursorBaseOffset
handlesKeyboard:
handlesMouseDown:
handlesMouseOver:
handlesMouseOverDragging:
keyStroke:
mouseDown:
mouseEnter:
mouseEnterDragging:
mouseLeave:
mouseLeaveDragging:
mouseMove:
mouseUp:
step
stepTime
wantsSteps

  formatting options
  alansTest1
controlContrast2:
controlContrast:
controlSpacing2:
controlSpacing:
lookClassic
usingClassicTiles

  highlighting
  borderColor:
compoundBorderColor
dropColor
grabColor
highlightForDrop:
highlightForGrab:
stdBorderColor
unhighlight
unhighlightBorder
unhighlightOwner
unhighlightOwnerBorder

  initialization
  inAPluggableScrollPane
inAScrollPane
openInWindow
returnNode:expression:
sample:

  insertion drop zones
  removeDropZones
trackDropZones

  layout
  addBlockArg:
addColumn:on:
addMorphBack:
addNoiseString:
addNoiseString:emphasis:
addRow:on:
addSingleKeywordRow:
addString:special:
addTempVar:
addTextRow:
addToBlock:event:
addToken:type:on:
addTokenSpecialCase:type:on:
addUnaryRow:style:
foldMessage
foldMessageOneArg
isKnownVarName:
removeReturnNode
tempVarNodesDo:
try
unfoldMessage

  menus
  accept
acceptIfInScriptor
acceptIgnoring:
acceptInCategory:
acceptSilently
acceptUnlogged
decompile
getMenuBlock
offerTilesMenuFor:in:
offerVarsMenuFor:in:
showCode
showMenu:
tearOffTile

  new tiles
  attachTileForCode:nodeType:
attachToHand
instVarTile:
string:toTilesIn:

  node to morph
  addTemporaries:
addTemporaryControls
alanBinaryPostRcvr:key:args:
alanKeywordMessage:isAConditional:key:args:
alanKwdCollect:isAConditional:key:args:
alanKwdIfDo:isAConditional:key:args:
alanKwdRepeatForDoing:isAConditional:key:args:
alanKwdSetter2:isAConditional:key:args:
alanKwdSetter:isAConditional:key:args:
alanUnaryGetter:key:
alanUnaryPostRcvr:key:selector:
alansMessageNode:receiver:selector:keywords:arguments:
assignmentNode:variable:value:
blockNode:arguments:statements:
blockNodeCollect:arguments:statements:
cascadeNode:receiver:messages:
changeBasicStyle
finalAppearanceTweaks
isStandardGetterSelector:
isStandardSetterKeyword:
messageNode:receiver:selector:keywords:arguments:
messageOneArg:receiver:selector:args:
methodNodeInner:selectorOrFalse:precedence:arguments:temporaries:primitive:block:
methodNodeOuter:
vanillaMessageNode:receiver:selector:arguments:

  node types
  findA:
immediatelyBelowTheMethodNode
isAVariable
isBlockNode
isDeclaration
isLeafTile
isMethodNode
isNoun
isSelfTile
isSyntaxMorph
nodeClassIs:
rootTile

  pop ups
  addArg:
assignmentArrow
changeSound:
colorChangedForSubmorph:
colorPatch
deleteLine
deletePopup
dismisser
dupTile:
duplicator
event:arrow:upDown:
extend
extendArrow
newAssignment
offerPopUp
replaceKeyWord:menuItem:
replaceSel:menuItem:
retract
retractArrow
selectorMenu
selectorMenuAsk:
setSelector:in:
tossOutArg:
upDown:event:arrow:
upDownArithOp:
upDownArrows
upDownAssignment:
upDownDone
upDownMore:event:arrow:

  printing
  getHeader:
ownerPrecedence
printAssignmentNodeOn:indent:
printBlockArgsNodeOn:indent:
printBlockNodeOn:indent:
printCascadeNodeOn:indent:
printMessageNodeOn:indent:
printMethodNodeOn:indent:
printMethodTempsNodeOn:indent:
printOn:
printOn:indent:
printSimpleStringMorph:on:
printStatementsOn:indent:
printVariableNodeOn:indent:
structure
submorphsDoIfSyntax:ifString:
submorphsDoIfSyntax:ifString:otherwise:

  selection
  currentSelectionDo:
deselect
isSelectable
scaleColorByUserPref:
select
setDeselectedColor
setSelection:
wantsKeyboardFocusFor:

  tests
  changed
test
testForNode:andDo:
toDo

  type checking
  allSpecs
argTypeFor:
currentVocabulary
okToBeReplacedBy:
receiverOrArgType
receiverOrArgTypeAbove
receiverTypeFor:
resultType
resultTypeFor:

  vocabulary
  limitClassToUseWith:vocabulary:
vocabularyToUseWith:

class methods
  as yet unclassified
  allSpecs
column:on:
initialize
methodNodeOuter:
noTileColor
row:on:
setSize:andMakeResizable:
sourceCodeTemplate
standardInset
test
testAll
testAllMethodsOver:
testClass:andMethod:
translateColor:

instance methods
  accessing top  
 

actualObject

Who is self in these tiles? Usually a Player.


 

argumentNodes

Return a collection of this message's argument nodes.


 

cleanUpString:


 

color:

Set the receiver's color. Directly set the color if appropriate, else go by way of fillStyle


 

dissectMessage

I am a MessageNode. Return {receiverNode or nil, selector, (keyword nodes), (argument nodes)}. Ignore all spacing morphs.


 

editor

In parallel with the interface for text morphs, we respond to this, but in our case we are our own editor


 

enclosingPane

The object that owns this script layout


 

externalName

Answer an external name by which the receiver is known. Generic implementation here is a transitional backstop. probably


 

fillStyle:

Set the current fillStyle of the receiver.


 

getCurrentValue


 

messageNode

Return the enclosing messageNode that is the full message. It has a receiver.


 

parseNode


 

parseNode:


 

parsedInClass


 

parsedInClass:


 

readOut

Find and return an UpdatingStringMorph, possibly in a NumericReadoutTile


 

receiverNode

If I am (have) a MessageNode, return the node of the receiver. Watch out for foolish noise words.


 

receiverObject

Return some object that could be the receiver to me (a selector). Either the actual object who is the receiver in this message, or a guy of the right class.


 

rename:

Attempt to change the name as listed in my tiles. Can change the number of argumtents. MethodNode (SelectorNode (SelectorNode (string))) or MethodNode (SelectorNode (SelectorNode (string) TempVarNode() SelectorNode (string) TempVarNode()))


 

selector

Find the selector I represent, or have inside of me. My parseNode is a SelectorNode or a MessageNode.


 

unSpaceAndUpShift:appending:


 

userScriptSelector

user wrote this script


 

userScriptSelector:

user wrote this script


  alans styles top  
 

aSimpleStringMorphWith:


 

alansCurrentFontPreference


 

alansTemplateStyleFor:


 

anUpdatingStringMorphWith:special:


 

constructSelfVariant:and:


 

darkerColor


 

fontToUseForSpecialWord:


 

lighterColor


 

noiseBeforeBlockArg


 

noiseStringMorph:


 

noiseWordBeforeVariableNode:string:


 

setConditionalPartStyle


 

setSpecialOuterTestFormat


 

setSpecialTempDeclarationFormat1

the outer template for temp defs


 

setSpecialTempDeclarationFormat2

the inner template for temp defs


 

shouldBeBrokenIntoWords:


 

specialColor:andBorder:


 

splitAtCapsAndDownshifted:


 

standardCellPositioning


 

standardInset


 

substituteKeywordFor:


 

tokenVerticalSeparator


 

translateFromWordySelfVariant:


 

translateToWordyGetter:

setBlob: becomes 's blob _


 

translateToWordySelfVariant:


 

translateToWordySetter:

setBlob: becomes 's blob _


  card & stack top  
 

couldHoldSeparateDataForEachInstance

Answer whether this type of morph is inherently capable of holding separate data for each instance ('card data')


 

currentDataValue

Answer the current data value held by the receiver


 

putOnBackground

Place the receiver, formerly private to its card, onto the shared background. If the receiver needs data carried on its behalf by the card, such data will be represented on every card.


 

setNewContentsFrom:

Using stringOrNumberOrNil as a guide, set the receiver's contents afresh. If the input parameter is nil, the a default value stored in a property of the receiver, if any, will supply the new initial content. This method is only called when a VariableDock is attempting to put a new value.


 

setTarget:

Find my UpdatingStringMorph and set its getSelector, putSelector, and target


 

variableDocks

Answer a list of VariableDock objects for docking up my data with an instance held in my containing playfield. For a numeric-readout tile.


  debugging top  
 

balloonText

Answer balloon help text or nil, if no help is available.
NB: subclasses may override such that they programatically construct
the text, for economy's sake, such as model phrases in a Viewer


 

debugger


 

debugger:


 

hostContext


 

update:

Receive a change notice from an object of whom the receiver is a
dependent. The default behavior is to do nothing; a subclass might want
to change itself in some way.


  drawing top  
 

drawOn:


 

lookTranslucent


  dropping/grabbing top  
 

acceptDroppingMorph:event:

Two cases: 1) a phrase being dropped into a block. Add a new line.
2) aMorph is replacing self by dropping on it.
For the moment, you have to drop it the right place (the end of a tile if it is complex). We do not look at enclosing morphs


 

cleanupAfterItDroppedOnMe

A tile just dropped into me. Clean up


 

justDroppedInto:event:

This message is sent to a dropped morph after it has been dropped on -- and been accepted by -- a drop-sensitive morph


 

morphToDropInPasteUp:

If property #beScript is true, create a scriptor around me.


 

structureMatchWith:

Return true if the node types would allow aMorph to replace me. This tests the gross structure of the method only.


 

wantsDroppedMorph:event:

For the moment, you have to drop it the right place. We do not look at enclosing morphs


  event handling top  
 

cursorBaseOffset


 

handlesKeyboard:

Return true if the receiver wishes to handle the given keyboard event


 

handlesMouseDown:

Do I want to receive mouseDown events (mouseDown:, mouseMove:, mouseUp:)?


 

handlesMouseOver:

Am I a tile that could be picked up?


 

handlesMouseOverDragging:

Return true if I want to receive mouseEnterDragging: and mouseLeaveDragging: when the hand drags something over me (button up or button down), or when the mouse button is down but there is no mouseDown recipient. The default response is false, except if you have added sensitivity to mouseEnterLaden: or mouseLeaveLaden:, using the on:send:to: mechanism.


 

keyStroke:

Handle a keystroke event.


 

mouseDown:

Handle a mouse down event. The default response is to let my eventHandler, if any, handle it.


 

mouseEnter:

Highlight this level as a potential grab target


 

mouseEnterDragging:

Highlight this level as a potential drop target


 

mouseLeave:

Move grab highlight back out a level


 

mouseLeaveDragging:

Transcript cr; print: self; show: ' leaveDragging'.


 

mouseMove:

Handle a mouse move event. The default response is to let my eventHandler, if any, handle it.


 

mouseUp:

Handle a mouse up event. The default response is to let my eventHandler, if any, handle it.


 

step

Do some periodic activity. Use startStepping/stopStepping to start and stop getting sent this message. The time between steps is specified by this morph's answer to the stepTime message. The generic version dispatches control to the player, if any. The nasty circumlocation about owner's transformation is necessitated by the flexing problem that the player remains in the properties dictionary both of the flex and the real morph. In the current architecture, only the top renderer's pointer to the player should actually be honored for the purpose of firing.


 

stepTime

Answer the desired time between steps in milliseconds. This default implementation requests that the 'step' method be called once every second.


 

wantsSteps

Only step this morph if we explicitly send startStepping


  formatting options top  
 

alansTest1


 

controlContrast2:


 

controlContrast:

old version. may be some scripts saved with me, so don't crash


 

controlSpacing2:


 

controlSpacing:

old version. may be some scripts saved with me, so don't crash


 

lookClassic


 

usingClassicTiles


  highlighting top  
 

borderColor:


 

compoundBorderColor


 

dropColor


 

grabColor

Not the select color, but the mouseOver border color. Means it could be grabbed


 

highlightForDrop:


 

highlightForGrab:


 

stdBorderColor

put choices of how to do the border here


 

unhighlight


 

unhighlightBorder


 

unhighlightOwner

Unhighlight my owner


 

unhighlightOwnerBorder

Unhighlight my owner's border


  initialization top  
 

inAPluggableScrollPane

Answer a PluggableTileScriptorMorph that holds the receiver


 

inAScrollPane

Answer a scroll pane in which the receiver is scrollable


 

openInWindow


 

returnNode:expression:


 

sample:

a comment


  insertion drop zones top  
 

removeDropZones

Remove the insertion drop-zone morphs.


 

trackDropZones


  layout top  
 

addBlockArg:

Add a temporary to a block or the method. Return true if succeed


 

addColumn:on:


 

addMorphBack:

m setProperty: #howAdded toValue: thisContext longStack.


 

addNoiseString:


 

addNoiseString:emphasis:


 

addRow:on:


 

addSingleKeywordRow:


 

addString:special:

Create and return an UpdatingStringMorph containing the value. Use an UpdatingStringMorph, so it can inform its owner when it has been edited. Keep the getSelector being nil


 

addTempVar:

know we are a block inside a MethodNode


 

addTextRow:


 

addToBlock:event:

Insert a new line of code. Figure out who it goes before. If evt Y is within an existing line (to the right of a tile), then replace that tile.


 

addToken:type:on:


 

addTokenSpecialCase:type:on:


 

addUnaryRow:style:


 

foldMessage

I am a message whose receiver is wide, and whose message part is a column.
Rearrange me so that the message part appears indented under the receiver part.


 

foldMessageOneArg

I am a message that is wide, a row with receiver and a row with selector and arg.
Rearrange me so that the message part appears indented under the receiver part.


 

isKnownVarName:

Return true if this variable is already known, as an argument, temp var, block temp, or instance variable.


 

removeReturnNode

If last line is ^ self, remove it. I am a methodNode. Keep if no other tiles in the block.


 

tempVarNodesDo:

Execute the block for any block temporary variables, method temps, or method args we have


 

try

Evaluate me once


 

unfoldMessage

I am a message whose message part is a column.
Rearrange me so that the entire message is one row.


  menus top  
 

accept

Turn my current state into the text of a method. Compile it in my class.


 

acceptIfInScriptor

If I am in a ScriptEditorMorph, tell my root to accept the new changes.


 

acceptIgnoring:

If I am inside a ScriptEditorMorph, tell my root to accept the new changes. Ignore the argument, which is the string whose conents just changed.


 

acceptInCategory:

Turn my current state into the text of a method. Compile it in my class.


 

acceptSilently

Turn my current state into the text of a method.
Compile it in my class. Don't rebuild the tiles.


 

acceptUnlogged

This is an exact copy of acceptSilently, except it does not log to the source file.
Used for all but the last of scrolling number changes.


 

decompile

Produce Smalltalk code. We have a tree of SyntaxMorphs, but not a tree of ParseNodes. The user has dragged in many SyntaxMorphs, each with its own parseNode, but those nodes are not sewn together in a tree. The only data we get from a ParseNode is its class.
We produce really ugly code. But we compile it and decompile (prettyPrint) again for user to see.


 

getMenuBlock


 

offerTilesMenuFor:in:

Offer a menu of tiles for assignment and constants


 

offerVarsMenuFor:in:

Offer a menu of tiles for assignment and constants


 

showCode

Turn my current state into the text of a method. Put it in a window.


 

showMenu:


 

tearOffTile

For a SyntaxMorph, this means give a copy of me


  new tiles top  
 

attachTileForCode:nodeType:

create a new tile for a part of speech, and put it into the hand


 

attachToHand

Adjust my look and attach me to the hand


 

instVarTile:

Make and put into hand a tile for an instance variable


 

string:toTilesIn:

Construct SyntaxMorph tiles for some code. Returns the main BlockNode of a doIt.


  node to morph top  
 

addTemporaries:


 

addTemporaryControls


 

alanBinaryPostRcvr:key:args:

==
Repeat for collection [ collect ( from foo. blah blah foo blah) ]
Repeat for 1 to 50Ê [ doÊ ( from i. blah blab i blahÊ )Ê ]
==


 

alanKeywordMessage:isAConditional:key:args:


 

alanKwdCollect:isAConditional:key:args:


 

alanKwdIfDo:isAConditional:key:args:

(know it has more than one arg)


 

alanKwdRepeatForDoing:isAConditional:key:args:


 

alanKwdSetter2:isAConditional:key:args:

translates
foo setHeading: 0
to
foo's heading _ 0


 

alanKwdSetter:isAConditional:key:args:


 

alanUnaryGetter:key:

I am a MessageNode. Fill me with a SelectorNode {getX} whose string is {'s x}. All on one level.


 

alanUnaryPostRcvr:key:selector:


 

alansMessageNode:receiver:selector:keywords:arguments:


 

assignmentNode:variable:value:


 

blockNode:arguments:statements:


 

blockNodeCollect:arguments:statements:


 

cascadeNode:receiver:messages:


 

changeBasicStyle


 

finalAppearanceTweaks


 

isStandardGetterSelector:


 

isStandardSetterKeyword:


 

messageNode:receiver:selector:keywords:arguments:


 

messageOneArg:receiver:selector:args:


 

methodNodeInner:selectorOrFalse:precedence:arguments:temporaries:primitive:block:


 

methodNodeOuter:


 

vanillaMessageNode:receiver:selector:arguments:


  node types top  
 

findA:

Allow finding on the class of the parseNode


 

immediatelyBelowTheMethodNode


 

isAVariable

There are three kinds of variable nodes


 

isBlockNode


 

isDeclaration

Return true if I am a TempVarNode inside a declaration of some kind, including a method arg


 

isLeafTile


 

isMethodNode


 

isNoun

Consider these to be nouns: MessageNode with receiver, CascadeNode with receiver, AssignmentNode, TempVariableNode, LiteralNode, VariableNode, LiteralVariableNode.


 

isSelfTile


 

isSyntaxMorph


 

nodeClassIs:

Test the class of my parseNode


 

rootTile


  pop ups top  
 

addArg:

I rep a SelectorNode. My string has been replaced. Append an argument to my owner.


 

assignmentArrow

Offer to embed this variable in a new assignment statement. (Don't confuse this with upDownAssignment:, which runs the up and down arrows that rotate among assignment types.)


 

changeSound:

move in the list of sounds. Adjust arg tile after me


 

colorChangedForSubmorph:

reporting a color change


 

colorPatch

Return a color patch button that lets the user choose a color and modifies the code


 

deleteLine


 

deletePopup


 

dismisser

Return the icon to delete this line of tiles. I am an entire line in a block.


 

dupTile:


 

duplicator

Return the icon to duplicate this tile.


 

event:arrow:upDown:

Reorder the arguments for existing event handlers


 

extend

replace this noun with a new message like (arg + 1). If type is not known, ask the user to type in a selector. Use nil as arg. Let user drag something to it afterwards.


 

extendArrow

Return the extend arrow button. It replaces the argument with a new message.
I am a number or getter messageNode.


 

newAssignment

I am a variableNode. Place me inside an assignment statement.


 

offerPopUp

Put up a halo to allow user to change
Literals (Integer, true),
Selector (beep: sound, +,-,*,//,\\, r:g:b:, setX: incX: decX: for any X,),
Variable (Color),
not AssignmentNode (_ inc dec),
Extend arrows on each literal, variable, and message, (block that is by itself).
Retract arrows on each literal or variable, or message or block that is an argument.
Any literal can be changed by Shift-clicking and typing.


 

replaceKeyWord:menuItem:

Replace my entire message (which may be multi-part) with the one specified. Preserve all argument tiles, either in the new message or in the world outside the scriptor. I am a SelectorNode or KeyWordNode.


 

replaceSel:menuItem:

I rep a SelectorNode. Replace my selector with new one that was just chosen from a menu


 

retract

replace this message with its receiver. I am the message node.


 

retractArrow

Return the retract arrow button. It replaces the current message with its receiver.
I am in a MessageNode whose first subnode is not a MessagePartNode. I did not encounter a block on the way up to it. I am the last subnode in every owner up to it.


 

selectorMenu

Put up a menu of all selectors that my receiver could be sent. Replace me with the one chosen. (If fewer args, put the tiles for the extra arg to the side, in script's owner (world?).)
Go ahead and eval receiver to find out its type. Later, mark selectors for side effects, and don't eval those.
Put up a table. Each column is a viewer category.


 

selectorMenuAsk:

I represent a SelectorNode to be replaced by one of the selectors in one of the category lists. Each list has pre-built StringMorphs in it.


 

setSelector:in:

store the new selector and accept method


 

tossOutArg:

Remove the tiles for the last N keywords and arguments. Place the tiles beside the current window. I am a SyntaxMorph for a MessageNode.


 

upDown:event:arrow:


 

upDownArithOp:

Change a + into a -. Also do sounds (change the arg to the beep:).


 

upDownArrows

Return an array of two up/down arrow buttons.
It replaces the selector or arg with a new one.
I am a number or boolean or a selector (beep:, +,-,*,//,\\, or setX: incX: decX: for any X.


 

upDownAssignment:

Rotate between increaseBy: decreaseBy: _ multiplyBy:


 

upDownDone


 

upDownMore:event:arrow:


  printing top  
 

getHeader:

We are in an EToy scriptor and the method header line has been removed. Try to recover the method name. Fail if method has args (deal with this later).


 

ownerPrecedence

Return the selector precedence of my owner. 1 for unary (asInteger), 2 for binary arithmetic (+), and 3 for keyword selectors (from:to:). Subtract 0.5 if self is an arg, not the receiver (the case of a + (b + c))


 

printAssignmentNodeOn:indent:

sometimes an assignment is in parens


 

printBlockArgsNodeOn:indent:


 

printBlockNodeOn:indent:


 

printCascadeNodeOn:indent:


 

printMessageNodeOn:indent:


 

printMethodNodeOn:indent:


 

printMethodTempsNodeOn:indent:


 

printOn:

Append to the argument, aStream, a sequence of characters that
identifies the receiver.


 

printOn:indent:


 

printSimpleStringMorph:on:


 

printStatementsOn:indent:

seemed to be necessary to see top node in explorer


 

printVariableNodeOn:indent:

nil out any old association


 

structure

Print my structure from inner to outer.


 

submorphsDoIfSyntax:ifString:


 

submorphsDoIfSyntax:ifString:otherwise:


  selection top  
 

currentSelectionDo:


 

deselect


 

isSelectable

Spacer morphs enclose other morphs with the same parseNode


 

scaleColorByUserPref:


 

select


 

setDeselectedColor

The normal color of the tile, stored with the tile


 

setSelection:

A selectionSpec is {Inner morph. Where clicked. Outer morph}.
First mouseDown starts a selection (with outerMorph == nil).
Dragging more than 4 pixels means to grab a copy of the current outer selection.
The current selection is the outerMorph, or the inner if it is nil.
Each mouseUp extends the selection to the next outer morph that is selectable.
Except if this is the first click.


 

wantsKeyboardFocusFor:

only let strings edit on shift-click. Editing on ordinary click defeats the brown selection and tile dragging.


  tests top  
 

changed

(self bounds area > 40000 and: [(self activeHand position dist: 293@289) < 50])
ifTrue: [self halt].


 

test


 

testForNode:andDo:


 

toDo


Biggies...
[ ] Integrate with EToy scriptors
releaseCachedState can discard all morphic structure.

[ ] Options:
Show / hide syntax markers (like [], (), ., :, ;, etc)
No color / color-in-focus / full color
Tiles / textiles / text

[ ] ParsedTextMorph -- looks like text but has all same substructure

[ ] Introduce notion of an UnParsedNode -- maybe a flag in ParseNode
Text -> UnParsed -> Parsed -> CodeGen

[ ] Need DnD evaluator, or some sort of '!' button on any entity (halo?)
Also inspector / browser

[ ] All the type help we can get

Details ...
[ ] Open up the parse of BraceNodes

[ ] Verify that all pastes are OK

[ ] Colors not yet right for colored version.

[ ] Start work on show / hide of syntax markers -- (), [], etc.

[ ] Start work on textiles (grabable entites in 'normal' text)

[ ] Need autoscroll during drag for drop

[ ] Use, eg, shift-drag to move, del to delete

[ ] What about invalid drops -- stick on cursor?

System...
[ ] Only keep history 7 deep; option to clear on quit
clear command above spaceLeft

[ ] Compute each page of prefs viewer on demand instead of as now.

[ ] Offer a search command that will gather up all preferences that match a given string (name or help string)

Preferences enable: #noTileColor.
Preferences disable: #noTileColor.
Smalltalk browseAllSelect: [:cm | cm size > 600]
SyntaxMorph testAll


  type checking top  
 

allSpecs

Return all specs that the Viewer knows about. Maybe cache it.


 

argTypeFor:

Answer the type of the argument of this selector. Return #unknown if not found.


 

currentVocabulary

Answer the current vocabulary associated with the receiver. If none is yet set, determine an appropriate vocabulary and cache it within my properties dictionary.


 

okToBeReplacedBy:

Return true if it is OK to replace me with aSyntaxMorph. Enforce the type rules in the old EToy green tiles.


 

receiverOrArgType

Return my type in my role as a receiver or as an argument. Ask my enclosing message first, then ask myself. (If owner accepts any #object, and I am a #point, do return #object.)


 

receiverOrArgTypeAbove

Return the type for me according to the message that encloses me.


 

receiverTypeFor:

Answer the type of the receiver of this selector. Return #unknown if not found.


 

resultType

Look up my result type. If I am a constant, use that class. If I am a message, look up the selector.


 

resultTypeFor:

Answer the result type of selector. Return #unknown if not found.


  vocabulary top  
 

limitClassToUseWith:vocabulary:

Answer the most generic whose method should be shown in a selector pop-up in the receiver that is put up on behalf of aValue


 

vocabularyToUseWith:

Answer a vocabulary to use with the given value


class methods
  as yet unclassified top  
 

allSpecs


 

column:on:


 

initialize

gather all the specs of all the kinds of EToy tiles.


 

methodNodeOuter:


 

noTileColor


 

row:on:


 

setSize:andMakeResizable:


 

sourceCodeTemplate

Return the default tile method template


 

standardInset


 

test


SyntaxMorph test


 

testAll


SyntaxMorph testAll


 

testAllMethodsOver:

MessageTally spyOn: [SyntaxMorph testAllMethodsOver: 600]


 

testClass:andMethod:


 

translateColor: