Squeak Class Documentation category index | class index  
 
Player
  category: Morphic-Scripting
  superclass: Model
  subclasses: UnscriptedPlayer Component Player6 Player175 Player157 Player176 CardPlayer Player44

The fundamental user-scriptable entity. Always represented by a user-specific subclass of Player; instance vars and methods relate to user-defined structures.

costume is a Morph, the primary morph I am currently wearing for graphical display.

Scripts are defined in subclasses of Player. These are UniClasses.

Messages in scripts are sent to Players. A Player may delegate to its costume, or to an object the costume suggests. Or, a Player may designate some other object to receive the script messages it does not understand. (see doesNotUnderstand:)

instance methods
  card/stack commands
  deleteCard
firstPage
getRoundedCorners
goToCard:
goToFirstCardInBackground
goToFirstCardOfStack
goToLastCardInBackground
goToLastCardOfStack
goToNextCardInStack
goToPreviousCardInStack
goto:
insertCard
lastPage
nextPage
previousPage
setRoundedCorners:

  copying
  copyUniClassWith:
initializeCostumesFrom:
veryDeepFixupWith:
veryDeepInner:

  costume
  availableCostumeNames
availableCostumesForArrows
clearOwnersPenTrails
clearPenTrails
costume
costume:
costumeRespondingTo:
costumes
costumesDo:
forgetOtherCostumes
getValueFromCostume:
hasAnyBorderedCostumes
hasCostumeThatIsAWorld
hasOnlySketchCostumes
knownSketchCostumeWithSameFormAs:
newCostume
rawCostume:
recaptureUniqueCostumes
rememberCostume:
renderedCostume:
renderedCostume:remember:
resetCostumeList
sendMessageToCostume:
sendMessageToCostume:with:
setCostumeSlot:toValue:
stamp
stampAndErase
tearOffButtonToFireScriptForSelector:
wearCostumeOf:
wearCostumeOfClass:
wearCostumeOfName:

  fileIn/Out
  releaseCachedState
storeDataOn:

  heading
  headDown
headLeft
headRight
headUp

  misc
  actorState
adoptScriptsFrom
allOpenViewers
allOpenViewersOnReceiverAndSiblings
assureUniClass
basicType
beNotZero:
belongsToUniClass
browseEToyVocabulary
browsePlayerClass
categoriesForViewer:
color
color:sees:
defaultFloatPrecisionFor:
defaultLabelForInspector
dummy
erase
getIsOverColor:
grabPlayerIn:
grabScriptorForSelector:in:
graphicForViewerTab
impartSketchScripts
indicateLocationOnScreen
isPlayerLike
makeBounceSound:
nameForViewer
noteDeletionOf:fromWorld:
offerAlternateViewerMenuFor:event:
offerViewerMenuFor:event:
openSearchingVocabularyBrowser
openUnderlyingScriptorFor:
ordinalNumber
presenter
printOn:
revealPlayerIn:
revertToUnscriptedPlayerIfAppropriate
roundUpStrays
seesColor:
stack
stringForReadout
tearOffTileForSelf
thumbnailMenuEvt:forMorph:
tileReferringToSelf
tileToRefer
touchesA:
unhideHiddenObjects
uninstallFrom:
unusedScriptName
updateAllViewers
updateAllViewersAndForceToShow:
viewerFlapTab
width

  name
  externalName
knownName
renameTo:
tryToRenameTo:
uniqueNameForReference

  object fileIn
 

  pen
  addPlayerMenuItemsTo:hand:
arrowheadsOnAllPens
choosePenColor:
choosePenSize
clearTurtleTrails
colorUnder
defaultPenColor
defaultPenSize
getPenArrowheads
getPenColor
getPenDown
getPenSize
liftAllPens
liftPen
lowerAllPens
lowerPen
noArrowheadsOnAllPens
penColor:
setPenArrowheads:
setPenColor:
setPenDown:
setPenSize:

  scripts-execution
  assureEventHandlerRepresentsStatus
fireOnce
prepareToBeRunning
runAllClosingScripts
runAllOpeningScripts
runAllTickingScripts:
scriptPerformer
scriptingError:
startRunning
startRunningScripts
step
stepAt:
stopProgramatically
stopRunning
wantsSteps

  scripts-kernel
  acceptScript:for:
allScriptEditors
editDescriptionForSelector:
elementTypeFor:vocabulary:
emptyScript
existingScriptInstantiationForSelector:
expungeEmptyScripts
expungeEmptyUnRenamedScripts
hasScriptInvoking:ofPlayer:
hasScriptReferencing:ofPlayer:
infoFor:inViewer:
instantiatedUserScriptsDo:
isEmptyTileScript:
isExpendableScript:
isUniversalTiles
makeIsolatedCodePaneForSelector:
methodInterfaceForEmptyScript
newScriptorAround:
newTextualScriptorFor:
noteRenameOf:to:inPlayer:
okayToDestroyScriptNamed:
okayToRemoveSlotNamed:
pacifyScript:
removeScript:fromWorld:
removeScriptWithSelector:
removeScriptWithoutUpdatingViewers:
removeScriptWithoutUpdatingViewers:fromWorld:
renameScript:
renameScript:newSelector:
runScript:
scriptEditorFor:
scriptEvaluatorFor:phrase:
scriptInstantiationForSelector:
scriptorsForSelector:inWorld:
slotInfoButtonHitFor:inViewer:
sourceCodeFor:
tilesToCall:
universalTilesForInterface:

  scripts-standard
  append:
assignStatus:toAllFor:
bounce:
changeScript:toStatus:
clear
contents
contents:
doButtonAction
doMenuItem:
doScript:
fire
followPath
forward:
getObtrudes
goToRightOf:
hide
initiatePainting
loadSineWave
loadSound:
makeNewDrawingIn:
menuItemAfter:
menuItemBefore:
moveToward:
pauseAll:
pauseScript:
play
removeAll
reverse
show
shuffleContents
startAll:
startScript:
stopAll:
stopScript:
tellAllSiblings:
turn:
wrap

  scripts-vector
  *
+
-
/
asPoint
decr:
dividedBy:
incr:
multBy:

  slot getters/setters
  cameraPoint
cameraPoint:
getActWhen
getAllButFirstCharacter
getAmount
getAngle
getBorderColor
getBorderStyle
getBorderWidth
getBottom
getBrightnessUnder
getCameraPoint
getCellInset
getCharacters
getClipSubmorphs
getColor
getColorUnder
getConePosition
getCostume
getCostumeAtCursor
getCursor
getCursorWrapped
getDescending
getDistance
getDragEnabled
getDropEnabled
getDropShadow
getFirstCharacter
getFirstElement
getGetListSelector
getGraphic
getGraphicAtCursor
getHResizing
getHeading
getHeadingUnrounded
getHeight
getHolder
getIndexInOwner
getIsLocked
getIsUnderMouse
getKnobColor
getLabel
getLastValue
getLayoutInset
getLeft
getLeftRight
getListCentering
getListDirection
getLuminanceUnder
getMaxVal
getMinVal
getMouseX
getMouseY
getName
getNewClone
getNumberAtCursor
getNumericValue
getOffsetX
getOffsetY
getPlayerAtCursor
getRadialGradientFill
getResistsRemoval
getRight
getRotationStyle
getSampleAtCursor
getSaturationUnder
getScale
getScaleFactor
getSecondColor
getShadowColor
getSpeed
getSticky
getTheta
getTop
getTruncate
getUpDown
getUseGradientFill
getVResizing
getValueAtCursor
getViewingByIcon
getWidth
getWrapDirection
getX
getY
handTheUserACopy
setActWhen:
setAllButFirstCharacter:
setBorderColor:
setBorderStyle:
setBorderWidth:
setBottom:
setCameraPoint:
setCellInset:
setCharacters:
setClipSubmorphs:
setColor:
setColorUnder:
setConePosition:
setCostume:
setCursor:
setCursorWrapped:
setDescending:
setDistance:
setDragEnabled:
setDropEnabled:
setDropShadow:
setFirstCharacter:
setFirstElement:
setGetListSelector:
setGraphic:
setHResizing:
setHeading:
setHeight:
setIndexInOwner:
setIsLocked:
setKnobColor:
setLabel:
setLastValue:
setLayoutInset:
setLeft:
setListCentering:
setListDirection:
setMaxVal:
setMinVal:
setName:
setNumberAtCursor:
setNumericValue:
setOffsetX:
setOffsetY:
setRadialGradientFill:
setResistsRemoval:
setRight:
setRotationStyle:
setSampleAtCursor:
setScale:
setScaleFactor:
setSecondColor:
setShadowColor:
setSticky:
setTheta:
setTop:
setTruncate:
setUseGradientFill:
setVResizing:
setValueAtCursor:
setViewingByIcon:
setWidth:
setWrapDirection:
setX:
setY:

  slots-assignment
  assignDecrGetter:setter:amt:
assignGetter:setter:amt:
assignIncrGetter:setter:amt:
assignMultGetter:setter:amt:

  slots-kernel
  categories
categoriesForVocabulary:
categoriesForWorld
methodInterfacesForInstanceVariablesCategoryIn:
methodInterfacesForScriptsCategoryIn:
slotInfo
slotNames
typeForSlot:
typeForSlot:vocabulary:
typeForSlotWithGetter:
usableMethodInterfacesIn:

  slots-user
  addInstanceVariable
addInstanceVariableNamed:type:value:
addSpecialSetter:
chooseSlotTypeFor:
chooseUserSlot
compileInstVarAccessorsFor:
doesNotUnderstand:
hasUserDefinedScripts
hasUserDefinedSlots
initialTypeForSlotNamed:
initialValueForSlotOfType:
offerGetterTiles:
removeSlotNamed:
renameSlot:
renameSlot:newSlotName:
setPrecisionFor:
slotInfoAt:
slotInfoAt:ifAbsent:
slotInfoForGetter:
slotNamesOfType:
tearOffFancyWatcherFor:
tearOffWatcherFor:
valueOfType:from:

  slots-wonderland
  getFogColor
getFogDensity
getFogRangeEnd
getFogRangeStart
getFogType
setFogColor:
setFogDensity:
setFogRangeEnd:
setFogRangeStart:
setFogType:

class methods
  housekeeping
  abandonUnnecessaryUniclasses
cleanseScriptsOfNilKeys
cleanseSlotInfo
freeUnreferencedSubclasses
isUniClass
playersWithUnnecessarySubclasses
removeUninstantiatedSubclassesSilently

  initialization
 

  namespace
  compileReferenceAccessorFor:
makeReferenceFor:
referenceAccessorSelectorFor:
referenceSelectorFor:

  other
  abandonOldReferenceScheme
chooseUniqueClassName
isSystemDefined
nameForViewer
officialClass
wantsChangeSetLogging
wantsRecompilationProgressReported

  scripts
  assuredMethodInterfaceFor:
atSelector:putScript:
bringScriptsUpToDate
jettisonScripts
namedTileScriptSelectors
nascentUserScriptInstance
permanentUserScriptFor:player:
privateScripts
removeScriptNamed:
scripts
scripts:
tilesFrom:
userScriptForPlayer:selector:
userScriptsDo:

  slots
  compileAccessorsFor:
compileInstVarAccessorsFor:
privateSlotInfo
removeAccessorsFor:
removeInstVarAccessorsFor:
removeInstVarName:
renameSilentlyInstVar:to:
slotGettersOfType:
slotInfo
slotInfo:

  user-scripted subclasses
  addDocumentationForScriptsTo:
baseUniclass
initialInstance
tileScriptNames

instance methods
  card/stack commands top  
 

deleteCard

Tell the receiver's stack to delete the current card


 

firstPage


 

getRoundedCorners

Anwer the rounded-corners attribute of my costume


 

goToCard:

Install aCard as the new current card of the stack


 

goToFirstCardInBackground

Send the stack to the first card of the current background


 

goToFirstCardOfStack

Send the stack to the first card of the entire stack


 

goToLastCardInBackground

Send the stack to the final card of the current background


 

goToLastCardOfStack

Send the stack to the last card of the entire stack


 

goToNextCardInStack

Install the next card into the receiver's stack


 

goToPreviousCardInStack

Install the previous card into the receiver's stack


 

goto:


 

insertCard

Insert a new card into the stack


 

lastPage


 

nextPage


 

previousPage


 

setRoundedCorners:

Set the rounded-corners attribute as indicated


  copying top  
 

copyUniClassWith:

my class is a subclass of Player. Return another class just like my class. Share the costume list.


 

initializeCostumesFrom:

Used to copy costume info over from an UnscriptedPlayer to a Player UniClass


 

veryDeepFixupWith:

Any uniClass inst var may have been weakly copied. If they were in the tree being copied, fix them up, otherwise point to the originals.


 

veryDeepInner:

Special code that handles user-added instance variables of a uniClass.
Copy all of my instance variables. Some need to be not copied at all, but shared. This is special code for the dictionary. See DeepCopier.


  costume top  
 

availableCostumeNames

Answer a list of class names (minus trailing ...Morph) to be offered in the thumbnail 'new-Costume' menu in the Viewer


 

availableCostumesForArrows


 

clearOwnersPenTrails

Clear the pen trails of the containing playfield


 

clearPenTrails

Allow old code invoking the short-lived deviant clearPenTrails command to continue to work when imported from a bj image into a mainstream image. For backward compatibility only!


 

costume


 

costume:

Make aMorph be the receiver's current costume


 

costumeRespondingTo:

Answer a costume that responds to the given selector, or nil if none


 

costumes

Answer a list of costumes associated with the receiver. The appearance of this method in class Object serves only as a backstop, probably only transitionally


 

costumesDo:

Evaluate aBlock against every real (not flex) costume known to the receiver)


 

forgetOtherCostumes


 

getValueFromCostume:


 

hasAnyBorderedCostumes

Answer true if any costumes of the receiver are BorderedMorph descendents


 

hasCostumeThatIsAWorld


 

hasOnlySketchCostumes

Answer true if the only costumes assocaited with this Player are SketchMorph costumes


 

knownSketchCostumeWithSameFormAs:


 

newCostume


 

rawCostume:


 

recaptureUniqueCostumes

Recapture all unique sketch-like costumes. Debugging only.


 

rememberCostume:

Put aCostume in my remembered-costumes list, as the final element


 

renderedCostume:

Make aMorph be the receiver's rendered costume; if flexing is currently in effect, make the new morph be flexed correspondingly


 

renderedCostume:remember:

Make aMorph be the receiver's rendered costume; if flexing is currently in effect, make the new morph be flexed correspondingly


 

resetCostumeList


 

sendMessageToCostume:


 

sendMessageToCostume:with:


 

setCostumeSlot:toValue:


 

stamp

stamp an image of ourself onto the pen trails form


 

stampAndErase


 

tearOffButtonToFireScriptForSelector:

Tear off a button to fire the script for the given selector


 

wearCostumeOf:

Put on a costume similar to the one currently worn by anotherPlayer


 

wearCostumeOfClass:

Assume that the costume in the library has player = nil


 

wearCostumeOfName:


  fileIn/Out top  
 

releaseCachedState

release all non-showing scriptors


 

storeDataOn:

Discard all non-showing script editors


  heading top  
 

headDown


 

headLeft


 

headRight


 

headUp


  misc top  
 

actorState


 

adoptScriptsFrom

Let the user click on another object form which the receiver should obtain scripts and code


 

allOpenViewers

Answer a list of all the viewers open on the receiver. Include viewers in closed flaps


 

allOpenViewersOnReceiverAndSiblings

Answer a list of all the viewers open on the receiver and any of its sibling instances. Include viewers in closed flaps


 

assureUniClass

If I am not currently a member of a UniClass, become one now


 

basicType

Answer a symbol representing the inherent type of the receiver


 

beNotZero:

This is a runtime check if the arg to divide in a script is zero. If it is, put up a message from M. Mouse. Return 0.001 instead of 0. Note the time. If fails again within 1 min., don't tell the user again.


 

belongsToUniClass

UnscriptedPlayer reimplements to false


 

browseEToyVocabulary

Open a protocol browser on the receiver, showing its etoy vocabulary


 

browsePlayerClass


 

categoriesForViewer:

Answer a list of category symbols to offer as alternatives in the viewer


 

color


 

color:sees:


 

defaultFloatPrecisionFor:

Answer the float position to use in conjunction with a readout for aGetSelector, which will be of the form 'getXXX'


 

defaultLabelForInspector

Answer the default label to be used for an Inspector window on the receiver.


 

dummy

this space for rent


 

erase


 

getIsOverColor:


 

grabPlayerIn:


 

grabScriptorForSelector:in:

Grab the scriptor for the given selector and place it in the hand


 

graphicForViewerTab

Answer the graphic to show in the tab of a Viewer looking at me


 

impartSketchScripts

Let the user designate another object to which my scripts and code should be imparted


 

indicateLocationOnScreen

Give momentary feedback on screen until mouse button is clicked


 

isPlayerLike

Return true if the receiver is a player-like object


 

makeBounceSound:


 

nameForViewer

Answer the name to be used for the receiver in its Viewer


 

noteDeletionOf:fromWorld:

aMorph, while pointing to me as its costumee, has been deleted


 

offerAlternateViewerMenuFor:event:

Put up an alternate Viewer menu on behalf of the receiver.


 

offerViewerMenuFor:event:

Put up the Viewer menu on behalf of the receiver. If the shift key is held down, put up the alternate menu.


 

openSearchingVocabularyBrowser

Open a vocabulary browser on the receiver, showing its etoy vocabulary. No senders; a disused but presumably still viable path, provisionally retained


 

openUnderlyingScriptorFor:

Open the underlying scriptor for the given selector


 

ordinalNumber

Answer a number indicating the relative position of the receiver in its stack, if any, else 1


 

presenter

Convenience for calling from user scripts


 

printOn:

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


 

revealPlayerIn:

Reveal the receiver if at all possible in the world; once it's visible, flash its image for a bit, and leave it with its halo showing


 

revertToUnscriptedPlayerIfAppropriate


 

roundUpStrays


 

seesColor:


 

stack

Answer the stack to which the receiver belongs. This only searches via the costume's parent pointer, so there is no guarantee that the stack that is found actually contains the receiver in its card list


 

stringForReadout


 

tearOffTileForSelf


 

thumbnailMenuEvt:forMorph:

The mouse went down in the thumbnail of a Viewer for the receiver


 

tileReferringToSelf

answer a tile that refers to the receiver


 

tileToRefer

Answer a reference tile that comprises an alias to me. Forgive this temporary and seemingly gratuituous revectoring as worlds collide


 

touchesA:


 

unhideHiddenObjects


 

uninstallFrom:

The receiver is about to be supplanted by another instance which is about to be installed as the current 'card' in the playfield. Exit gracefully


 

unusedScriptName

answer a name of the form 'scriptN', where N is one higher than the highest-numbered similarly-named script


 

updateAllViewers

The receiver's structure has changed, so viewers on it and its siblings need to be reconstituted.


 

updateAllViewersAndForceToShow:

The receiver's structure has changed, so viewers on it and all its siblings need to be reconstituted.


 

viewerFlapTab

If a viewer in a flap exists for me, return it.


 

width


  name top  
 

externalName

Answer an external name for the receiver. If it has none, supply a backstop name


 

knownName

Answer a name by which the receiver is known, or nil if none


 

renameTo:


 

tryToRenameTo:


 

uniqueNameForReference

Answer a unique name for referring to the receiver


  object fileIn top  

  pen top  
 

addPlayerMenuItemsTo:hand:

Note that these items are primarily available in another way in an object's Viewer


 

arrowheadsOnAllPens

Only for the Player of a World


 

choosePenColor:


 

choosePenSize


 

clearTurtleTrails


 

colorUnder


 

defaultPenColor


 

defaultPenSize


 

getPenArrowheads

Answer a boolean indicating whether the receiver's pen will draw an arrowhead at the end of a stroke


 

getPenColor

Answer the current pen color


 

getPenDown

Answer a boolean indicating whether the receiver's pen is currently down (true) or up (false)


 

getPenSize

Answer a number indicating the current pen size


 

liftAllPens


 

liftPen


 

lowerAllPens


 

lowerPen


 

noArrowheadsOnAllPens

Only for the Player of a Playfield


 

penColor:


 

setPenArrowheads:

Set whether the pen will draw arrowheads on the ends of strokes


 

setPenColor:

Set the turtle pen color as indicated


 

setPenDown:

Set the penDown state as indicated, to true or false


 

setPenSize:

Set the pen size as indicated


  scripts-execution top  
 

assureEventHandlerRepresentsStatus


 

fireOnce

If the receiver has any script armed to be triggered on mouse down and/or mouse-up, run those scripts now -- first the mouseDown ones, then the mouseUp ones.


 

prepareToBeRunning


 

runAllClosingScripts

Run all the receiver's scripts marked as #closing. Return a boolean indicating whether any such scripts were encountered and run


 

runAllOpeningScripts

Run all the receiver's scripts marked as #opening. Return a boolean indicating whether any such scripts were encountered and run


 

runAllTickingScripts:


 

scriptPerformer


 

scriptingError:

An error arose, characterized by aMessage, when a script was being run. For the moment, we report it to the transcript only


 

startRunning


 

startRunningScripts


 

step

obsolete


 

stepAt:


 

stopProgramatically

stop running my ticking scripts -- called from running code


 

stopRunning


 

wantsSteps

UnscriptedPlayer, with no scripts, overrides to false


  scripts-kernel top  
 

acceptScript:for:

Accept the tile code in the script editor as the code for the given selector. This branch is only for the classic-tile system, 1997-2001


 

allScriptEditors

Used presently only an one-shot efforts to update all tile scripts to new styles


 

editDescriptionForSelector:

Allow the user to edit the balloon-help description for the given selector


 

elementTypeFor:vocabulary:

Answer whether aStringOrSymbol is best characterized as a #systemSlot, #systemScript, #userSlot, or #userScript. This is ancient and odious but too tedious to rip out at this point.


 

emptyScript

The empty script


 

existingScriptInstantiationForSelector:

Answer the existing script instantiation for the given selector, or nil if none


 

expungeEmptyScripts

Track down and destroy -- and destroy screen artifacts relating to -- all scripts belonging to the receiver that have no lines of code in them


 

expungeEmptyUnRenamedScripts

Track down and destroy -- and destroy screen artifacts relating to -- all scripts belonging to the receiver that have not been named and that have no lines of code in them


 

hasScriptInvoking:ofPlayer:

Answer whether the receiver bears any script that invokes a script of the given name for the given player


 

hasScriptReferencing:ofPlayer:

Answer whether the receiver bears any script that references a slot of the given name for the given player


 

infoFor:inViewer:

The user made a gesture asking for info/menu relating


 

instantiatedUserScriptsDo:

Evaluate aBlock on behalf of all the instantiated user scripts in the receiver


 

isEmptyTileScript:

Answer whether the script of the given name is an empty classic tile script. Presently disused -- formerly it was all too easy to propagate many empty tile scripts but this difficulty has receded considerably with recent changes, so this has no senders other than from an unusual menu item, and will perhaps die soon


 

isExpendableScript:


 

isUniversalTiles

Return true if I (my world) uses universal tiles. This message can be called in places where the current World is not known, such as when writing out a project. For information about the writingUniversalTiles thing, contact Ted Kaehler.


 

makeIsolatedCodePaneForSelector:

make an isolated code pane for the given selector


 

methodInterfaceForEmptyScript

Answer a MethodInterface representing Andreas's 'emptyScript' feature


 

newScriptorAround:

Sprout a scriptor around aPhrase, thus making a new script. aPhrase may either be a PhraseTileMorph (classic tiles 1997-2001) or a SyntaxMorph (2001 onward)


 

newTextualScriptorFor:

Sprout a scriptor for aSelector, opening up in textual mode. Rather special-purpose, consult my lone sender


 

noteRenameOf:to:inPlayer:

Note that aPlayer has renamed a slot formerly known as oldSlotName to be newSlotName


 

okayToDestroyScriptNamed:


 

okayToRemoveSlotNamed:


 

pacifyScript:

Make sure the script represented by the symbol doesn't do damage by lingering in related structures on the morph side


 

removeScript:fromWorld:

Remove the given script, and get the display right in aWorld


 

removeScriptWithSelector:

Remove the given script, and get the display right


 

removeScriptWithoutUpdatingViewers:


 

removeScriptWithoutUpdatingViewers:fromWorld:


 

renameScript:

The user has asked to rename the script formerly known by oldSelector; obtain a new selector from the user, check it out, and if all is well, ascribe the new name as appropriate


 

renameScript:newSelector:

Rename the given script to have the new selector


 

runScript:

Called from script-activation buttons. Provides a safe way to run a script that may have changed its name


 

scriptEditorFor:

Answer the receiver's script editor for aSelector


 

scriptEvaluatorFor:phrase:


 

scriptInstantiationForSelector:

Answer a script instantiation for the given selector, creating it at this time if necessary


 

scriptorsForSelector:inWorld:

Answer, for the purpose of deletion, a list of all scriptor objects for the given selector that are associated with any member of the receiver's uniclass


 

slotInfoButtonHitFor:inViewer:

The user made a gesture asking for slot menu for the given getter symbol in a viewer; put up the menu.


 

sourceCodeFor:


 

tilesToCall:

Answer a phrase for the non-typed command represented by aMethodInterface.


 

universalTilesForInterface:

Return universal tiles for the given method interface. Record who self is.


  scripts-standard top  
 

append:

Add aPlayer to the list of objects logically 'within' me. This is visually represented by its morph becoming my costume's last submorph. Also allow text to be appended.


 

assignStatus:toAllFor:

Change the status of my script of the given name to be as specified in me and all of my siblings.


 

bounce:

If the receiver's current bounds obtrude beyond the bounds of its container, then 'bounce' it back within the container, and make the indicated sound while doing so


 

changeScript:toStatus:

Change the script of the given name to have the given status, and get all relevant script-status controls updated


 

clear


 

contents


 

contents:


 

doButtonAction

Do the button action of my costume


 

doMenuItem:

Do the menu item whose wording is provided


 

doScript:

On the next tick of the clock, run the given script once


 

fire

Do the button action of my costume


 

followPath

If there is a path defined for this object, follow it now


 

forward:

Move forward (viz. in the direction of my heading) by the given amount


 

getObtrudes

Answer whether the receiver's costume obtrudes beyond the bounds of its container


 

goToRightOf:

Place the object so that it lies directly to the right of the given object


 

hide

Make the object be hidden, as opposed to visible


 

initiatePainting


 

loadSineWave


 

loadSound:


 

makeNewDrawingIn:


 

menuItemAfter:


 

menuItemBefore:


 

moveToward:

Move a standard amount in the direction of the given player. If the object has an instance variable named 'speed', the speed of the motion will be governed by that value


 

pauseAll:

Change the status of my script of the given name to be #paused in me and all of my siblings.


 

pauseScript:

Change the status of my script of the given name to be #paused


 

play


 

removeAll

Remove all the elements from my companion morph's collection. This is destructive!


 

reverse


 

show

Make the object be visible, as opposed to hidden


 

shuffleContents

Tell my costume to rearrange its submorphs randomly


 

startAll:

Change the status of my script of the given name to be #ticking in me and all of my siblings.


 

startScript:

Change the status of my script of the given name to be #ticking


 

stopAll:

Change the status of my script of the given name to be #normal in me and all of my siblings.


 

stopScript:

Change the status of my script of the given name to be #normal


 

tellAllSiblings:

Send the given message selector to all my sibling instances, but not to myself


 

turn:

Rotate the heading of the object by the given number of degrees


 

wrap

If the object has gone outside the bounds of its container, zap it over to the opposite edge of the container, providing a 'wrapping' impression


  scripts-vector top  
 

*

Treating Players like vectors, return a new Player that is myself scaled by the number


 

+

Treating Players like vectors, add aPlayer to me and return a new Player


 

-

Treating Players like vectors, subtract aPlayer from me and return a new Player


 

/

Treating Players like vectors, return a new Player that is myself divided by the number


 

asPoint


 

decr:

Treating Players like vectors, subtract aPlayer from me


 

dividedBy:

Treating Players like vectors, divide myself by aNumber


 

incr:

Treating Players like vectors, add aPlayer to me


 

multBy:

Treating Players like vectors, scale myself by aNumber


  slot getters/setters top  
 

cameraPoint


 

cameraPoint:


 

getActWhen

Answer the #actWhen status of my costume, which is expected to be a button with an #actWhen protocol


 

getAllButFirstCharacter

Answer a string consisting of all but the first character in its string


 

getAmount


 

getAngle


 

getBorderColor

Answer the border color of my costume


 

getBorderStyle

Answer the border style


 

getBorderWidth

Answer the border width of my costume


 

getBottom

Answer the bottom coordinate, in the cartesian sense (decreases towards bottom of screen)


 

getBrightnessUnder


 

getCameraPoint


 

getCellInset

Getter for costume's cellInset


 

getCharacters

Answer the characters in my costume, likely a TextMorph


 

getClipSubmorphs

Getter for costume's clipSubmorphs


 

getColor

Answer the color of my costume. If it uses a gradient fill, answer the first color.


 

getColorUnder

Answer the color beneath the center of the costume


 

getConePosition

Note: Performance hacked to allow real-time sound. Assumes costume is a SpeakerMorph.


 

getCostume

Answer a form representing the receiver's primary graphic. An earlier wording, disused but may persist in preexisting scripts.


 

getCostumeAtCursor

Answer the form representing the object at the current cursor. An earlier wording, disused but may persist in preexisting scripts


 

getCursor

Obtain the cursor setting from the receiver's costume


 

getCursorWrapped

maintained for backward compatibility only, for preexisting etoys


 

getDescending


 

getDistance

Answer distance from the origin to the objet's position


 

getDragEnabled

Getter for costume's dragEnabled


 

getDropEnabled

Getter for costume's dropEnabled


 

getDropShadow

Getter for costume's hasDropShadow


 

getFirstCharacter

Answer a string consisting of the first character in my costume, likely itself a TextMorph


 

getFirstElement

Answer a player representing the receiver's costume's first submorph


 

getGetListSelector

Answer the selector used by my costume (a list) to obtain a fresh copy of its list


 

getGraphic

Answer a form representing the receiver's primary graphic


 

getGraphicAtCursor

Answer the form representing the object at the current cursor


 

getHResizing

Getter for costume's hResizing


 

getHeading

Answer the heading of the object, always given as a whole number


 

getHeadingUnrounded


 

getHeight

Answer the height of the object


 

getHolder

Answer the player belonging to my costume's container


 

getIndexInOwner

Answer my costume's index in its owner


 

getIsLocked

Answer whether the receiver's costume is locked


 

getIsUnderMouse

Answer true or false, depending on whether the object currently is or is not under the mouse


 

getKnobColor


 

getLabel

Answer the label of my costume


 

getLastValue


 

getLayoutInset

Getter for costume's layoutInset


 

getLeft

answer the left coordinate


 

getLeftRight


 

getListCentering

Getter for costume's listCentering


 

getListDirection

Getter for costume's listDirection


 

getLuminanceUnder


 

getMaxVal


 

getMinVal


 

getMouseX


 

getMouseY


 

getName


 

getNewClone

Answer a new player of the same class as the receiver, with a costume much like mine


 

getNumberAtCursor

Answer the number borne by the object at my costume's current cursor position


 

getNumericValue

Answer the numeric value contained in my costume


 

getOffsetX


 

getOffsetY


 

getPlayerAtCursor


 

getRadialGradientFill

Geter for costume's useGradientFill


 

getResistsRemoval

Answer whether the receiver is marked to resist removal


 

getRight

Answer the coordinate of the right edge of the object


 

getRotationStyle


 

getSampleAtCursor

Note: Performance hacked to allow real-time sound. Assumes costume is a GraphMorph.


 

getSaturationUnder


 

getScale


 

getScaleFactor

Answer the scale factor of the object


 

getSecondColor

Getter for costume's second color, if it's using gradient fill; sonst answers white.


 

getShadowColor

Getter for costume's shadowColor


 

getSpeed

If user defines a speed slot, it will override this. This provides a backstop value for use with moveToward:, etc


 

getSticky

Getter for costume's isSticky


 

getTheta

Answer the angle between the positive x-axis and the line connecting the origin and the object's position


 

getTop

Answer the coordinate of the topmost point of the object, using cartesian sense


 

getTruncate


 

getUpDown


 

getUseGradientFill

Geter for costume's useGradientFill


 

getVResizing

Getter for costume's vResizing


 

getValueAtCursor


 

getViewingByIcon

Answer whether my costume is currently viewing by icon


 

getWidth

Answer the width of the object


 

getWrapDirection

Getter for costume's wrapDirection


 

getX

emergency patch; unclear why not needed in getY; in any case, have
removed the getX/getY retrievals from the viewer in 2.0-final anyway


 

getY

Answer the y coordinate of the object, relative to its container


 

handTheUserACopy

Called from the user-interface: hand the user a copy


 

setActWhen:

Tell the receiver's costume (hopefully a button!) to set its actWhen parameter as indicated


 

setAllButFirstCharacter:

Set my costume's all-but-first characters to be aString


 

setBorderColor:

Set the border color as requested


 

setBorderStyle:

Set the border style of my costume


 

setBorderWidth:

Set the border width to the given number


 

setBottom:

Set the bottom coordinate (cartesian sense) of the object as requested


 

setCameraPoint:


 

setCellInset:

Setter for costume's cellInset


 

setCharacters:

Set my costume's characters as indicated


 

setClipSubmorphs:

Setter for costume's clipSubmorphs


 

setColor:

Set the color of the graphic as requested


 

setColorUnder:

Provide a soft landing for old readouts that may try to send this


 

setConePosition:

Note: Performance hacked to allow real-time sound. Assumes costume is a SpeakerMorph.


 

setCostume:

Set the receiver's graphic as indicated. An earlier wording, disused but may persist in preexisting scripts.


 

setCursor:

Set my costume's cursor to the given number


 

setCursorWrapped:

maintained for backward compatibility with existing etoys


 

setDescending:


 

setDistance:

Set the object's distance from the origin to be as indicated, preserving its angle.


 

setDragEnabled:

Setter for costume's dragEnabled


 

setDropEnabled:

Setter for costume's dropEnabled


 

setDropShadow:

Setter for costume's dropShadow


 

setFirstCharacter:

Set my costume's first character to the indicated one


 

setFirstElement:

Caution - this is a replacement operation! Replace the receiver's costume's first element with the morph represented by aPlayer


 

setGetListSelector:

Set the receiver's get-list-selector as indicated.


 

setGraphic:

Set the receiver's graphic as indicated. An earlier wording, disused but may persist in preexisting scripts.


 

setHResizing:

Setter for costume's hResizing


 

setHeading:

Set the heading as indicated


 

setHeight:

Set the height of the object as indicated


 

setIndexInOwner:

Move my costume to a different z-position within its container. This is primarily in service of auto-line-layout views in which the z-ordering determines the left/right and top/bottom placement.


 

setIsLocked:

Set my costume's isLocked


 

setKnobColor:


 

setLabel:

Set the receiver's costume's label as specified


 

setLastValue:


 

setLayoutInset:

Setter for costume's layoutInset


 

setLeft:

Set the object's left coordinate as indicated


 

setListCentering:

Setter for costume's listCentering


 

setListDirection:

Setter for costume's listDirection


 

setMaxVal:


 

setMinVal:


 

setName:


 

setNumberAtCursor:

Place the given number into the morph residing at my costume's current cursor position


 

setNumericValue:

Set the receiver's numeric value to the amount. This is passed on to the costume


 

setOffsetX:


 

setOffsetY:


 

setRadialGradientFill:

Setter for costume's radialGradientFill


 

setResistsRemoval:

Set the resistsRemoval property


 

setRight:

Set the right coordinate to the given value


 

setRotationStyle:


 

setSampleAtCursor:

Note: Performance hacked to allow real-time sound. Assumes costume is a GraphMorph.


 

setScale:


 

setScaleFactor:

Set the scale factor to be the given value


 

setSecondColor:

Setter for costume's second color, if it's using gradient fill; if not, does nothing


 

setShadowColor:

Setter for costume's shadowColor


 

setSticky:

Setter for costume's sticky


 

setTheta:

Set the object's position such that its rho is unchanged but the angle between the positive x-axis and the vector connecting the origin and the object's position is as given.


 

setTop:

Set the top coordinate as indicated, using cartesian sense


 

setTruncate:


 

setUseGradientFill:

Setter for costume's useGradientFill


 

setVResizing:

Setter for costume's vResizing


 

setValueAtCursor:


 

setViewingByIcon:

Set the user's costume's view-by-icon attribute as indictated


 

setWidth:

Set the width to the given value


 

setWrapDirection:

Setter for costume's wrapDirection


 

setX:

Set the x coordinate as indicated


 

setY:

Set the y coordinate as indicated


  slots-assignment top  
 

assignDecrGetter:setter:amt:


 

assignGetter:setter:amt:


 

assignIncrGetter:setter:amt:


 

assignMultGetter:setter:amt:


  slots-kernel top  
 

categories

Answer a list of categories appropriate to the the receiver and its costumes


 

categoriesForVocabulary:

Answer a list of categories appropriate to the receiver and its costumes, in the given Vocabulary


 

categoriesForWorld

Answer the list of categories given that the receiver is the Player representing a World


 

methodInterfacesForInstanceVariablesCategoryIn:

Return a collection of methodInterfaces for the instance-variables category. The vocabulary parameter, at present anyway, is not used.


 

methodInterfacesForScriptsCategoryIn:

Answer a list of method interfaces for the category #scripts, as seen in a viewer or other tool. The vocabulary argument is not presently used.


 

slotInfo

Answer a list of slot-information objects. Initally only provides useful info for players


 

slotNames


 

typeForSlot:

Answer the data type for values of the instance variable of the given name


 

typeForSlot:vocabulary:

Answer the data type for values of the instance variable of the given name. Presently has no senders but retained for a while...


 

typeForSlotWithGetter:

Answer the data type for values of the instance variable of the given name


 

usableMethodInterfacesIn:

Filter the list given by methodInterfaceList, to remove items inappropriate to the receiver


  slots-user top  
 

addInstanceVariable

Offer the user the opportunity to add an instance variable, and if he goes through with it, actually add it


 

addInstanceVariableNamed:type:value:

Add an instance variable of the given name and type, and initialize it to have the given value


 

addSpecialSetter:

For the special setters, fooIncreaseBy:, fooDecreaseBy:, fooMultiplyBy:, add a method that does them.


 

chooseSlotTypeFor:

Let the user designate a type for the slot associated with the given getter


 

chooseUserSlot


 

compileInstVarAccessorsFor:


 

doesNotUnderstand:

See it the message is a special setter that has not been defined. Define it and try again.


 

hasUserDefinedScripts


 

hasUserDefinedSlots

Answer whether the receiver has any user-defined slots, in the omniuser sense of the term. This is needed to allow Viewers to look at any object, not just at Players.


 

initialTypeForSlotNamed:

Answer the initial type to be ascribed to the given instance variable


 

initialValueForSlotOfType:

Answer the default initial value to ascribe to a slot of the given type


 

offerGetterTiles:

For a player-type slot, offer to build convenient compound tiles that otherwise would be hard to get


 

removeSlotNamed:


 

renameSlot:


 

renameSlot:newSlotName:


 

setPrecisionFor:


 

slotInfoAt:


 

slotInfoAt:ifAbsent:

If the receiver has a slot of the given name, answer its slot info, else answer nil


 

slotInfoForGetter:

Answer a SlotInformation object which describes an instance variable of mine retrieved via the given getter, or nil if none


 

slotNamesOfType:

Answer a list of potential slot names of the given type in the receiver


 

tearOffFancyWatcherFor:

Create 'Player3 heading = 43' as in independent entity. It keeps up with the truth, and may be edited to change the variable.


 

tearOffWatcherFor:

Tear off a watcher for the slot whose getter is provided


 

valueOfType:from:

The user has changed a slot's type to aType; convert its former value, oldValue, to something of the appropriate type. For now, does not take oldValue into account


  slots-wonderland top  
 

getFogColor


 

getFogDensity


 

getFogRangeEnd


 

getFogRangeStart


 

getFogType


 

setFogColor:


 

setFogDensity:


 

setFogRangeEnd:


 

setFogRangeStart:


 

setFogType:


class methods
  housekeeping top  
 

abandonUnnecessaryUniclasses

Player abandonUnnecessaryUniclasses


 

cleanseScriptsOfNilKeys

If, owing to an earlier bug, the receiver's scripts dictionary has a nil key, remove that offender before he causes more trouble


 

cleanseSlotInfo


 

freeUnreferencedSubclasses

Player classes may hold in their class instance variables references
to instances of themselves that are housekeepingwise unreachable. This
method allows such loops to be garbage collected. This is done in three
steps:
1. Remove user-created subclasses from the 'subclasses' set and from
Smalltalk. Only remove classes whose name begins with 'Player' and which
have no references.
2. Do a full garbage collection.
3. Enumerate all Metaclasses and find those whose soleInstance's
superclass is this class. Reset the subclasses set to this set of
classes, and add back to Smalltalk.


 

isUniClass

UnscriptedPlayer reimplements to false


 

playersWithUnnecessarySubclasses

Return a list of all players whose scripts dictionaries contain entries with nil selectors


 

removeUninstantiatedSubclassesSilently

Remove the classes of any subclasses that have neither instances nor subclasses. Answer the number of bytes reclaimed


  initialization top  

  namespace top  
 

compileReferenceAccessorFor:

Compile reference accessors for the given variable. If the #capitalizedReferences preference is true, then nothing is done here


 

makeReferenceFor:


 

referenceAccessorSelectorFor:


 

referenceSelectorFor:


  other top  
 

abandonOldReferenceScheme

Abandon the old reference scheme


 

chooseUniqueClassName


 

isSystemDefined

Answer true if the receiver is a system-defined class, and not a UniClass (an instance-specific lightweight class)


 

nameForViewer

Answer the name by which the receiver is to be referred in a viewer


 

officialClass

We want to make a new instance of the receiver, which is a subclass of Player. Answer who to make a new subclass of. Also used to tell if a given class is a UniClass, existing only for its single instance.


 

wantsChangeSetLogging

Log changes for Player itself, but not for automatically-created subclasses like Player1, Player2, but *do* log it for uniclasses that have been manually renamed.


 

wantsRecompilationProgressReported

Report progress for Player itself, but not for automatically-created subclasses like Player1, Player2


  scripts top  
 

assuredMethodInterfaceFor:

Answer the method interface object for aSelector, creating it if it does not already exist.


 

atSelector:putScript:

Place the given method interface in my directory of scripts, at the given selector


 

bringScriptsUpToDate

Bring all the receiver's scripts up to date, after, for example, a name change


 

jettisonScripts


 

namedTileScriptSelectors

Answer a list of all the selectors of named tile scripts


 

nascentUserScriptInstance

Answer a new script object of the appropriate class


 

permanentUserScriptFor:player:

Create and answer a suitable script object for the given player (who will be an instance of the receiver) and selector. Save that script-interface object in my (i.e. the class's) directory of scripts


 

privateScripts

for copying


 

removeScriptNamed:


 

scripts

Answer the receiver's scripts -- an IdentityDictionary


 

scripts:

for copying


 

tilesFrom:

Construct SyntaxMorph tiles for the String.


 

userScriptForPlayer:selector:

Answer the user script for the player (one copy for all instances of the uniclass) and selector


 

userScriptsDo:


  slots top  
 

compileAccessorsFor:


 

compileInstVarAccessorsFor:

Compile getters and setteres for the given instance variable name


 

privateSlotInfo

for copying


 

removeAccessorsFor:


 

removeInstVarAccessorsFor:


 

removeInstVarName:

Remove the argument, aString, as one of the receiver's instance variables.


 

renameSilentlyInstVar:to:


 

slotGettersOfType:

Answer a list of gettter selectors for slots of mine of the given type


 

slotInfo

Answer a list of slot-information objects. Initally only provides useful info for players


 

slotInfo:

for copying


  user-scripted subclasses top  
 

addDocumentationForScriptsTo:

Add documentation for every script in the receiver to the stream


 

baseUniclass

Answer the uniclass that new instances should be instances of; this protocol allows for individual cards of a background to have their own class


 

initialInstance

Answer the first instance of the receiver, generate an error if there is one already


 

tileScriptNames