David T. Lewis uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-dtl.512.mcz
==================== Summary ====================
Name: EToys-dtl.512 Author: dtl Time: 15 January 2024, 10:50:16.812014 pm UUID: 47637fe7-cd6a-4bdf-8b34-91be4f2f2f2e Ancestors: EToys-dtl.511
Additional method category cleanups for Etoys package.
=============== Diff against EToys-dtl.511 ===============
Item was changed: + ----- Method: Player>>appendCharacters: (in category 'scripts-standard') ----- - ----- Method: Player>>appendCharacters: (in category '*Etoys-Squeakland-scripts-standard') ----- appendCharacters: aString "append the characters from the given player to my end"
self costume renderedMorph appendCharacters: aString!
Item was changed: + ----- Method: Player>>appendVertex (in category 'vertices operation') ----- - ----- Method: Player>>appendVertex (in category '*Etoys-Squeakland-vertices operation') ----- appendVertex
self costume appendVertex!
Item was changed: + ----- Method: Player>>attachTo: (in category 'SpeechBubbles') ----- - ----- Method: Player>>attachTo: (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- attachTo: aPlayer self sendMessageToCostume: #target: with: aPlayer costume renderedMorph !
Item was changed: + ----- Method: Player>>basicBeNotZero: (in category 'misc') ----- - ----- Method: Player>>basicBeNotZero: (in category '*Etoys-Squeakland-misc') ----- basicBeNotZero: aNumber "This is a runtime check if the arg to divide in a script is zero. If it is, put up a warning message. Return 0.001 instead of 0. Note the time. If fails again within 1 min., don't tell the user again."
aNumber = 0 ifFalse: [^ aNumber]. "normal case" "We have a problem" TimeOfError ifNil: [TimeOfError := Time totalSeconds] ifNotNil: [(Time totalSeconds - TimeOfError) > 45 ifTrue: [ TimeOfError := Time totalSeconds. "in case user interrupt and reenter" self inform: 'Dividing by zero makes a number too large for even a Sorcerer to handle. Please change your script.' translated. TimeOfError := Time totalSeconds]]. ^ 0.001!
Item was changed: + ----- Method: Player>>basicType (in category 'tiles') ----- - ----- Method: Player>>basicType (in category '*eToys-tiles') ----- basicType "Answer a symbol representing the inherent type of the receiver"
^ #Player!
Item was changed: + ----- Method: Player>>bearingFrom: (in category 'special numeric slots') ----- - ----- Method: Player>>bearingFrom: (in category '*Etoys-Squeakland-special numeric slots') ----- bearingFrom: aPlayer "Answer the bearing to the receiver from another player"
^ (aPlayer costume referencePositionInWorld bearingToPoint: costume referencePositionInWorld) asSmallAngleDegrees!
Item was changed: + ----- Method: Player>>bearingTo: (in category 'special numeric slots') ----- - ----- Method: Player>>bearingTo: (in category '*Etoys-Squeakland-special numeric slots') ----- bearingTo: aPlayer "Answer the bearing from the receiver to another player."
^ (costume referencePositionInWorld bearingToPoint: aPlayer costume referencePositionInWorld) asSmallAngleDegrees!
Item was changed: + ----- Method: Player>>changeSlotInfo: (in category 'slots-user') ----- - ----- Method: Player>>changeSlotInfo: (in category '*Etoys-Squeakland-slots-user') ----- changeSlotInfo: aSymbol
Project current world addMorphInLayer: (ModifyVariableDialogMorph on: self costume slot: aSymbol) centeredNear: (self currentHand ifNil: [Sensor]) cursorPoint.!
Item was changed: + ----- Method: Player>>changeSlotTypeOf:to: (in category 'slots-user') ----- - ----- Method: Player>>changeSlotTypeOf:to: (in category '*Etoys-Squeakland-slots-user') ----- changeSlotTypeOf: slotName to: newType (self typeForSlot: slotName) capitalized = newType ifTrue: [^ self].
(self slotInfoAt: slotName) type: newType. self class allInstancesDo: "allSubInstancesDo:" [:anInst | anInst instVarNamed: slotName asString put: (anInst valueOfType: newType from: (anInst instVarNamed: slotName))]. self updateAllViewers. "does siblings too" self changeTypesInWatchersOf: slotName. "does siblings too" !
Item was changed: + ----- Method: Player>>defaultScriptName (in category 'misc') ----- - ----- Method: Player>>defaultScriptName (in category '*Etoys-Squeakland-misc') ----- defaultScriptName ^'script' translated asLegalSelector!
Item was changed: + ----- Method: Player>>destroyAllScripts (in category 'scripts-kernel') ----- - ----- Method: Player>>destroyAllScripts (in category '*Etoys-Squeakland-scripts-kernel') ----- destroyAllScripts "Destroy all the scripts belonging to the receiver."
| sels | self class isUniClass ifFalse: [^ self].
Cursor wait showWhile: [sels := self class scripts collect: [:s | s selector]. sels do: [:aSel | self removeScriptWithSelector: aSel]] !
Item was changed: + ----- Method: Player>>distanceToPlayer: (in category 'special numeric slots') ----- - ----- Method: Player>>distanceToPlayer: (in category '*Etoys-Squeakland-special numeric slots') ----- distanceToPlayer: aPlayer "Simplified distance... simply answer the distance between the reference positions of the two objects."
^ costume referencePositionInWorld dist: aPlayer costume referencePositionInWorld!
Item was changed: + ----- Method: Player>>emptyTrashCan (in category 'playing commands') ----- - ----- Method: Player>>emptyTrashCan (in category '*Etoys-Squeakland-playing commands') ----- emptyTrashCan
Utilities emptyScrapsBookGC. !
Item was changed: + ----- Method: Player>>fitPlayfield (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>fitPlayfield (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- fitPlayfield "For number-lines: command to extend/contract the line so that it fits entirely within the containing playfield to which it pertains."
costume fitPlayfield!
Item was changed: + ----- Method: Player>>flipLeftRight (in category 'costume') ----- - ----- Method: Player>>flipLeftRight (in category '*Etoys-Squeakland-costume') ----- flipLeftRight self costume renderedMorph allMorphsDo: [ :m | m isSketchMorph ifTrue: [m flipHorizontal]]!
Item was changed: + ----- Method: Player>>flipUpDown (in category 'costume') ----- - ----- Method: Player>>flipUpDown (in category '*Etoys-Squeakland-costume') ----- flipUpDown self costume renderedMorph allMorphsDo: [ :m | m isSketchMorph ifTrue: [m flipVertical]]!
Item was changed: + ----- Method: Player>>forceAxisToX: (in category 'slots-bonus for geometry') ----- - ----- Method: Player>>forceAxisToX: (in category '*Etoys-Squeakland-slots-bonus for geometry') ----- forceAxisToX: aNumber
self setRotationCenter: aNumber @ self getRotationCenterY!
Item was changed: + ----- Method: Player>>forceAxisToY: (in category 'slots-bonus for geometry') ----- - ----- Method: Player>>forceAxisToY: (in category '*Etoys-Squeakland-slots-bonus for geometry') ----- forceAxisToY: aNumber
self setRotationCenter: self getRotationCenterX @ aNumber!
Item was changed: + ----- Method: Player>>getAttachment (in category 'SpeechBubbles') ----- - ----- Method: Player>>getAttachment (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- getAttachment ^ [(self sendMessageToCostume: #target) assuredPlayer] on: Error do: [self presenter standardPlayer] !
Item was changed: + ----- Method: Player>>getAttachmentEdge (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getAttachmentEdge (in category '*Etoys-Squeakland-slot getters/setters') ----- getAttachmentEdge "Answer the attachment edge, a point."
^ costume renderedMorph attachmentEdge!
Item was changed: + ----- Method: Player>>getAttachmentOffset (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getAttachmentOffset (in category '*Etoys-Squeakland-slot getters/setters') ----- getAttachmentOffset "Answer the attachment offset, a point."
^ costume renderedMorph attachmentOffset!
Item was changed: + ----- Method: Player>>getBlue (in category 'slots-color components') ----- - ----- Method: Player>>getBlue (in category '*Etoys-Squeakland-slots-color components') ----- getBlue ^ self getColor blue * 100!
Item was changed: + ----- Method: Player>>getBlur (in category 'sketch filters') ----- - ----- Method: Player>>getBlur (in category '*Etoys-Squeakland-sketch filters') ----- getBlur ^ self getFilterValue: #blur:form:!
Item was changed: + ----- Method: Player>>getBrightness (in category 'slots-color components') ----- - ----- Method: Player>>getBrightness (in category '*Etoys-Squeakland-slots-color components') ----- getBrightness ^ self getColor brightness * 100!
Item was changed: + ----- Method: Player>>getBrightnessShift (in category 'sketch filters') ----- - ----- Method: Player>>getBrightnessShift (in category '*Etoys-Squeakland-sketch filters') ----- getBrightnessShift ^ self getFilterValue: #brightnessShift:form:!
Item was changed: + ----- Method: Player>>getBubble (in category 'SpeechBubbles') ----- - ----- Method: Player>>getBubble (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- getBubble ^[self costume renderedMorph bubble assuredPlayer] on: Error do: [self presenter standardPlayer]!
Item was changed: + ----- Method: Player>>getClassName (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getClassName (in category '*Etoys-Squeakland-slot getters/setters') ----- getClassName "Answer the name of the class"
^ self class name asString!
Item was changed: + ----- Method: Player>>getCurrentKey (in category 'input') ----- - ----- Method: Player>>getCurrentKey (in category '*Etoys-Squeakland-etoys-input') ----- getCurrentKey ^ self sendMessageToCostume: #currentKey!
Item was changed: + ----- Method: Player>>getDate (in category 'etoys-calendar') ----- - ----- Method: Player>>getDate (in category '*Etoys-Squeakland-etoys-calendar') ----- getDate "Answer a string representing the selected date."
| format | format := self getDateFormat caseOf: { [#'dd/mm/yyyy'] -> [#(1 2 3 $/ 1 1)]. [#'yyyy/mm/dd'] -> [#(3 2 1 $/ 1 1)]. [#'mm/dd/yyyy'] -> [#(2 1 3 $/ 1 1)]. } otherwise: [#(1 2 3 $ 3 1 )].
^ self costume renderedMorph date printFormat: format!
Item was changed: + ----- Method: Player>>getDateFormat (in category 'etoys-calendar') ----- - ----- Method: Player>>getDateFormat (in category '*Etoys-Squeakland-etoys-calendar') ----- getDateFormat ^ self costume renderedMorph valueOfProperty: #dateFormat ifAbsent: [#'mm/dd/yyyy'].!
Item was changed: + ----- Method: Player>>getDay (in category 'etoys-calendar') ----- - ----- Method: Player>>getDay (in category '*Etoys-Squeakland-etoys-calendar') ----- getDay "Answer the day-of-month of the selcted day."
^self costume renderedMorph date dayOfMonth!
Item was changed: + ----- Method: Player>>getDayName (in category 'etoys-calendar') ----- - ----- Method: Player>>getDayName (in category '*Etoys-Squeakland-etoys-calendar') ----- getDayName "Answer the day-of-week (e.g. 'Monday') of the selected day."
^ self costume renderedMorph date weekday asString translated!
Item was changed: + ----- Method: Player>>getFilterValue: (in category 'sketch filters') ----- - ----- Method: Player>>getFilterValue: (in category '*Etoys-Squeakland-sketch filters') ----- getFilterValue: aFilter self costume renderedMorph isSketchMorph ifFalse:[^0]. self costume renderedMorph filters do: [:i | (i includes: aFilter) ifTrue: [^i second]]. ^0!
Item was changed: + ----- Method: Player>>getFishEye (in category 'sketch filters') ----- - ----- Method: Player>>getFishEye (in category '*Etoys-Squeakland-sketch filters') ----- getFishEye ^ self getFilterValue: #fishEye:form:!
Item was changed: + ----- Method: Player>>getFlashCursor (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getFlashCursor (in category '*Etoys-Squeakland-slot getters/setters') ----- getFlashCursor "Obtain the cursor setting from a FlashPlayerMorph. Given a separate getter so that it can have a separate entry in the vocabulary's dictionary of methodInterfaces."
^ self getCursor!
Item was changed: + ----- Method: Player>>getForwardDirection (in category 'slots-bonus for geometry') ----- - ----- Method: Player>>getForwardDirection (in category '*Etoys-Squeakland-slots-bonus for geometry') ----- getForwardDirection
^ self costume forwardDirection!
Item was changed: + ----- Method: Player>>getGifPlaying (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>getGifPlaying (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- getGifPlaying ^self getValueFromCostume: #isStepping!
Item was changed: + ----- Method: Player>>getGraphCursor (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getGraphCursor (in category '*Etoys-Squeakland-slot getters/setters') ----- getGraphCursor "Obtain the cursor setting from a FlashPlayerMorph. Given a separate getter so that it can have a separate entry in the vocabulary's dictionary of methodInterfaces."
^ self getCursor!
Item was changed: + ----- Method: Player>>getGreen (in category 'slots-color components') ----- - ----- Method: Player>>getGreen (in category '*Etoys-Squeakland-slots-color components') ----- getGreen ^ self getColor green * 100!
Item was changed: + ----- Method: Player>>getHasPenTrails (in category 'pen') ----- - ----- Method: Player>>getHasPenTrails (in category '*Etoys-Squeakland-pen') ----- getHasPenTrails "Answer whether the receiver has any pen trails."
^ self costume renderedMorph hasPenTrails!
Item was changed: + ----- Method: Player>>getHash (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getHash (in category '*Etoys-Squeakland-slot getters/setters') ----- getHash "Answer the receiver's hash"
^ self hash!
Item was changed: + ----- Method: Player>>getHighlightColor (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getHighlightColor (in category '*Etoys-Squeakland-slot getters/setters') ----- getHighlightColor "Answer the value of the costume's highlightColor."
^ costume highlightColor !
Item was changed: + ----- Method: Player>>getHue (in category 'slots-color components') ----- - ----- Method: Player>>getHue (in category '*Etoys-Squeakland-slots-color components') ----- getHue | hue | hue := self getColor hue. ^ hue > 180 ifTrue: [-360 + hue] ifFalse: [hue]!
Item was changed: + ----- Method: Player>>getHueShift (in category 'sketch filters') ----- - ----- Method: Player>>getHueShift (in category '*Etoys-Squeakland-sketch filters') ----- getHueShift ^ self getFilterValue: #hueShift:form:!
Item was changed: + ----- Method: Player>>getImplicitSelfInTiles (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getImplicitSelfInTiles (in category '*Etoys-Squeakland-slot getters/setters') ----- getImplicitSelfInTiles "Getter for the #implicitSelfInTiles preference."
^ Preferences implicitSelfInTiles!
Item was changed: + ----- Method: Player>>getJulianDay (in category 'etoys-calendar') ----- - ----- Method: Player>>getJulianDay (in category '*Etoys-Squeakland-etoys-calendar') ----- getJulianDay "Answer the julian day of the corresponding calendar's selected date."
^ self costume renderedMorph date asJulianDayNumber!
Item was changed: + ----- Method: Player>>getKeyIsPressed (in category 'input') ----- - ----- Method: Player>>getKeyIsPressed (in category '*Etoys-Squeakland-etoys-input') ----- getKeyIsPressed ^ self sendMessageToCostume: #isPressed!
Item was changed: + ----- Method: Player>>getLineCurved (in category 'vertices operation') ----- - ----- Method: Player>>getLineCurved (in category '*Etoys-Squeakland-vertices operation') ----- getLineCurved
^ self costume isCurve!
Item was changed: + ----- Method: Player>>getLineOpened (in category 'vertices operation') ----- - ----- Method: Player>>getLineOpened (in category '*Etoys-Squeakland-vertices operation') ----- getLineOpened
^ self costume isOpen!
Item was changed: + ----- Method: Player>>getLocation (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getLocation (in category '*Etoys-Squeakland-slot getters/setters') ----- getLocation "Answer the object's location. At the time of publication, the #getLocationRounded variant is the one actually in use."
^ self getX @ self getY!
Item was changed: + ----- Method: Player>>getLocationOnGraph (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>getLocationOnGraph (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- getLocationOnGraph "Answer the x-y with respect to a corresponding axis, if any; if none, for a dimension, use the simple x or y coordinate for it."
^ (self getXOnGraph @ self getYOnGraph) asFloatPoint!
Item was changed: + ----- Method: Player>>getLocationRounded (in category 'points') ----- - ----- Method: Player>>getLocationRounded (in category '*Etoys-Squeakland-points') ----- getLocationRounded "Answer the object's location, rounded for ease of display in a viewer"
^ (self getX @ self getY) rounded!
Item was changed: + ----- Method: Player>>getMagnification (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getMagnification (in category '*Etoys-Squeakland-slot getters/setters') ----- getMagnification "Answer the bottom coordinate, in the cartesian sense (decreases towards bottom of screen)"
^ self costume renderedMorph magnification!
Item was changed: + ----- Method: Player>>getMarksPerLegend (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>getMarksPerLegend (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- getMarksPerLegend ^ self getValueFromCostume: #marksPerLegend!
Item was changed: + ----- Method: Player>>getMonth (in category 'etoys-calendar') ----- - ----- Method: Player>>getMonth (in category '*Etoys-Squeakland-etoys-calendar') ----- getMonth "Answer the month-number of the selected month."
^ self costume renderedMorph date monthIndex!
Item was changed: + ----- Method: Player>>getMonthName (in category 'etoys-calendar') ----- - ----- Method: Player>>getMonthName (in category '*Etoys-Squeakland-etoys-calendar') ----- getMonthName "Answer the month name, e.g. 'Oktober', of the selected month, in the local language."
^ self costume renderedMorph date monthName asString translated!
Item was changed: + ----- Method: Player>>getNumberOfPages (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getNumberOfPages (in category '*Etoys-Squeakland-slot getters/setters') ----- getNumberOfPages "Answer how many pages the book currently has"
| aBook | ^ (aBook := self bookEmbodied) ifNotNil: [aBook pages size] ifNil: [0]!
Item was changed: + ----- Method: Player>>getObjectSize (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getObjectSize (in category '*Etoys-Squeakland-slot getters/setters') ----- getObjectSize "Answer the receiver's object size. This is probably not the right thing to compute"
^ self class allInstVarNames size!
Item was changed: + ----- Method: Player>>getOpaque (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>getOpaque (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- getOpaque ^self getValueFromCostume: #isOpaque!
Item was changed: + ----- Method: Player>>getPageControlsAtTop (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getPageControlsAtTop (in category '*Etoys-Squeakland-slot getters/setters') ----- getPageControlsAtTop "Answer whether the book is currently set to show page controls at top."
| aBook | ^ (aBook := self bookEmbodied) ifNotNil: [aBook pageControlsAtTop] ifNil: [false]!
Item was changed: + ----- Method: Player>>getPageControlsShort (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getPageControlsShort (in category '*Etoys-Squeakland-slot getters/setters') ----- getPageControlsShort "Answer whether the book is currentset to show short page controls"
| aBook | ^ (aBook := self bookEmbodied) ifNotNil: [aBook pageControlsShort] ifNil: [false]!
Item was changed: + ----- Method: Player>>getPageControlsShowing (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getPageControlsShowing (in category '*Etoys-Squeakland-slot getters/setters') ----- getPageControlsShowing "Answer whether the book is current showing page-controls"
| aBook | ^ (aBook := self bookEmbodied) ifNotNil: [aBook pageControlsVisible] ifNil: [false]!
Item was changed: + ----- Method: Player>>getPageCount (in category 'playing commands') ----- - ----- Method: Player>>getPageCount (in category '*Etoys-Squeakland-playing commands') ----- getPageCount
| b | b := ScrapBook default scrapBook renderedMorph. ^ b ifNotNil: [b pages size] ifNil: [1]. !
Item was changed: + ----- Method: Player>>getPasteUpCursor (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getPasteUpCursor (in category '*Etoys-Squeakland-slot getters/setters') ----- getPasteUpCursor "Obtain the cursor setting from a PasteUpMorph. Given a separate getter so that it can have a separate entry in the vocabulary's dictionary of methodInterfaces."
^ self getCursor!
Item was changed: + ----- Method: Player>>getPasteUpGraphic (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getPasteUpGraphic (in category '*Etoys-Squeakland-slot getters/setters') ----- getPasteUpGraphic "Obtain the graphic from a PasteUpMorph. Given a separate getter so that it can have a separate entry in the vocabulary's dictionary of methodInterfaces."
^ self getGraphic!
Item was changed: + ----- Method: Player>>getPenTrailGraphic (in category 'pen') ----- - ----- Method: Player>>getPenTrailGraphic (in category '*Etoys-Squeakland-pen') ----- getPenTrailGraphic "Answer a Form containing a snapshot of my pen trails."
^ (costume renderedMorph turtleTrailsForm ifNil: [ScriptingSystem formAtKey: #NoTrails]) trimBordersOfColor: Color transparent
!
Item was changed: + ----- Method: Player>>getPixelsPerUnit (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>getPixelsPerUnit (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- getPixelsPerUnit "Answer the number of pixels per unit on a number line"
^ costume renderedMorph pixelsPerUnit!
Item was changed: + ----- Method: Player>>getPrecisionFor: (in category 'slots-user') ----- - ----- Method: Player>>getPrecisionFor: (in category '*Etoys-Squeakland-slots-user') ----- getPrecisionFor: slotName "get the precision for the given slot name"
| aGetter places precision | precision := 1. (self slotInfo includesKey: slotName) ifTrue: ["it's a user slot" precision := (self slotInfoAt: slotName) floatPrecision] ifFalse: ["reference to system slots" aGetter := slotName asGetterSelector. self costume renderedMorph ifNotNil: [ :morph | places := morph decimalPlacesForGetter: aGetter. precision := Utilities floatPrecisionForDecimalPlaces: places ]]. ^precision!
Item was changed: + ----- Method: Player>>getPrintString (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getPrintString (in category '*Etoys-Squeakland-slot getters/setters') ----- getPrintString "Answer a string representing the object"
^ self costume printString!
Item was changed: + ----- Method: Player>>getRed (in category 'slots-color components') ----- - ----- Method: Player>>getRed (in category '*Etoys-Squeakland-slots-color components') ----- getRed ^ self getColor red * 100!
Item was changed: + ----- Method: Player>>getRelativeScale (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getRelativeScale (in category '*Etoys-Squeakland-slot getters/setters') ----- getRelativeScale ^ costume relativeScale !
Item was changed: + ----- Method: Player>>getRotationCenter (in category 'slots-bonus for geometry') ----- - ----- Method: Player>>getRotationCenter (in category '*Etoys-Squeakland-slots-bonus for geometry') ----- getRotationCenter | morph point world aPlayfield | morph := self costume renderedMorph. point := morph bounds origin + (morph rotationCenter * morph extent). (self costume isKindOf: TransformMorph) ifTrue: [point := self costume transform localPointToGlobal: point]. world := self costume world. world ifNil: [^ point]. aPlayfield := morph referencePlayfield. ^ aPlayfield isNil ifTrue: [point x - world cartesianOrigin x @ (world cartesianOrigin y - point y)] ifFalse: [point x - aPlayfield cartesianOrigin x @ (aPlayfield cartesianOrigin y - point y)]!
Item was changed: + ----- Method: Player>>getRotationCenterX (in category 'slots-bonus for geometry') ----- - ----- Method: Player>>getRotationCenterX (in category '*Etoys-Squeakland-slots-bonus for geometry') ----- getRotationCenterX ^ self getRotationCenter x!
Item was changed: + ----- Method: Player>>getRotationCenterY (in category 'slots-bonus for geometry') ----- - ----- Method: Player>>getRotationCenterY (in category '*Etoys-Squeakland-slots-bonus for geometry') ----- getRotationCenterY ^ self getRotationCenter y!
Item was changed: + ----- Method: Player>>getSamplingRate (in category 'MorphicExtras-Widgets') ----- - ----- Method: Player>>getSamplingRate (in category '*Etoys-Squeakland-MorphicExtras-Widgets') ----- getSamplingRate ^ self getValueFromCostume: #getSamplingRate!
Item was changed: + ----- Method: Player>>getSaturation (in category 'slots-color components') ----- - ----- Method: Player>>getSaturation (in category '*Etoys-Squeakland-slots-color components') ----- getSaturation ^ self getColor saturation * 100!
Item was changed: + ----- Method: Player>>getSaturationShift (in category 'sketch filters') ----- - ----- Method: Player>>getSaturationShift (in category '*Etoys-Squeakland-sketch filters') ----- getSaturationShift ^ self getFilterValue: #saturationShift:form:!
Item was changed: + ----- Method: Player>>getSectorAngle (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>getSectorAngle (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- getSectorAngle ^ self sendMessageToCostume: #angle!
Item was changed: + ----- Method: Player>>getSectorRadius (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>getSectorRadius (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- getSectorRadius ^ self sendMessageToCostume: #radius!
Item was changed: + ----- Method: Player>>getShowFPS (in category 'MorphicExtras-WebCam') ----- - ----- Method: Player>>getShowFPS (in category '*Etoys-Squeakland-MorphicExtras-WebCam') ----- getShowFPS ^ self getValueFromCostume: #getShowFPS!
Item was changed: + ----- Method: Player>>getShowNegativeArrowHead (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>getShowNegativeArrowHead (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- getShowNegativeArrowHead ^ self getValueFromCostume: #showNegativeArrowHead!
Item was changed: + ----- Method: Player>>getShowPointer (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getShowPointer (in category '*Etoys-Squeakland-slot getters/setters') ----- getShowPointer "Answer the setting of my costume's showPointer"
^ self costume renderedMorph showPointer!
Item was changed: + ----- Method: Player>>getShowZero (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>getShowZero (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- getShowZero ^ self getValueFromCostume: #showZero!
Item was changed: + ----- Method: Player>>getShowingHandles (in category 'vertices operation') ----- - ----- Method: Player>>getShowingHandles (in category '*Etoys-Squeakland-vertices operation') ----- getShowingHandles
^ self costume showingHandles!
Item was changed: + ----- Method: Player>>getStarRatio (in category 'vertices operation') ----- - ----- Method: Player>>getStarRatio (in category '*Etoys-Squeakland-vertices operation') ----- getStarRatio ^ (self costume starRatio * 100) rounded!
Item was changed: + ----- Method: Player>>getTextColor (in category 'scripts-standard') ----- - ----- Method: Player>>getTextColor (in category '*Etoys-Squeakland-scripts-standard') ----- getTextColor
^ self costume renderedMorph selectionColor!
Item was changed: + ----- Method: Player>>getTextCursor (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getTextCursor (in category '*Etoys-Squeakland-slot getters/setters') ----- getTextCursor "Obtain the cursor setting from a TextMorph. Given a separate getter so that it can have a separate entry in the vocabulary's dictionary of methodInterfaces."
^ self getCursor!
Item was changed: + ----- Method: Player>>getTimePressed (in category 'input') ----- - ----- Method: Player>>getTimePressed (in category '*Etoys-Squeakland-etoys-input') ----- getTimePressed ^ self sendMessageToCostume: #timePressed!
Item was changed: + ----- Method: Player>>getTimer (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getTimer (in category '*Etoys-Squeakland-slot getters/setters') ----- getTimer | last msecs | last := costume renderedMorph valueOfProperty: #timerStart ifAbsent: [0]. msecs := Time millisecondsSince: last. "allow negative timer values, e.g. for count downs" msecs > (SmallInteger maxVal // 2) ifTrue: [msecs := msecs - SmallInteger maxVal]. ^msecs / 1000.0!
Item was changed: + ----- Method: Player>>getTrackPointer (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getTrackPointer (in category '*Etoys-Squeakland-slot getters/setters') ----- getTrackPointer "Answer the setting of my costume's trackPointer"
^ self costume renderedMorph trackPointer!
Item was changed: + ----- Method: Player>>getUnitsPerMark (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>getUnitsPerMark (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- getUnitsPerMark ^ self getValueFromCostume: #unitsPerMark!
Item was changed: + ----- Method: Player>>getUseFrameSize (in category 'MorphicExtras-WebCam') ----- - ----- Method: Player>>getUseFrameSize (in category '*Etoys-Squeakland-MorphicExtras-WebCam') ----- getUseFrameSize ^ self getValueFromCostume: #getUseFrameSize. !
Item was changed: + ----- Method: Player>>getVertexCursor (in category 'vertices operation') ----- - ----- Method: Player>>getVertexCursor (in category '*Etoys-Squeakland-vertices operation') ----- getVertexCursor
^ self costume vertexCursor!
Item was changed: + ----- Method: Player>>getVerticesCount (in category 'vertices operation') ----- - ----- Method: Player>>getVerticesCount (in category '*Etoys-Squeakland-vertices operation') ----- getVerticesCount
^ self costume vertices size!
Item was changed: + ----- Method: Player>>getVideoGraphic (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>getVideoGraphic (in category '*Etoys-Squeakland-slot getters/setters') ----- getVideoGraphic "Obtain the graphic from a VideoMorph. Given a separate getter so that it can have a separate entry in the vocabulary's dictionary of methodInterfaces."
^ self getGraphic!
Item was changed: + ----- Method: Player>>getWebCamIsOn (in category 'MorphicExtras-WebCam') ----- - ----- Method: Player>>getWebCamIsOn (in category '*Etoys-Squeakland-MorphicExtras-WebCam') ----- getWebCamIsOn ^ self getValueFromCostume: #getWebCamIsOn!
Item was changed: + ----- Method: Player>>getWebCamOrientation (in category 'MorphicExtras-WebCam') ----- - ----- Method: Player>>getWebCamOrientation (in category '*Etoys-Squeakland-MorphicExtras-WebCam') ----- getWebCamOrientation ^ self getValueFromCostume: #getWebCamOrientation!
Item was changed: + ----- Method: Player>>getWebCamResolution (in category 'MorphicExtras-WebCam') ----- - ----- Method: Player>>getWebCamResolution (in category '*Etoys-Squeakland-MorphicExtras-WebCam') ----- getWebCamResolution ^ self getValueFromCostume: #getWebCamResolution!
Item was changed: + ----- Method: Player>>getWhirl (in category 'sketch filters') ----- - ----- Method: Player>>getWhirl (in category '*Etoys-Squeakland-sketch filters') ----- getWhirl ^ self getFilterValue: #whirl:form:!
Item was changed: + ----- Method: Player>>getXAtCursor (in category 'vertices operation') ----- - ----- Method: Player>>getXAtCursor (in category '*Etoys-Squeakland-vertices operation') ----- getXAtCursor
^ (self costume xAtCursor) !
Item was changed: + ----- Method: Player>>getXOnGraph (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>getXOnGraph (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- getXOnGraph "Answer the x-coordinate with respect to a corresponding horizontal axis, if any; if none, answer the cartesian x"
| aCostume | (aCostume := self costume) isInWorld ifFalse: [^ self getX].
(aCostume referencePlayfield findA: HorizontalNumberLineMorph) ifNotNil: [:aNumberLine | ^ aNumberLine horizontalCoordinateOf: aCostume]. ^ self getX!
Item was changed: + ----- Method: Player>>getYAtCursor (in category 'vertices operation') ----- - ----- Method: Player>>getYAtCursor (in category '*Etoys-Squeakland-vertices operation') ----- getYAtCursor
^ (self costume yAtCursor) !
Item was changed: + ----- Method: Player>>getYOnGraph (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>getYOnGraph (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- getYOnGraph "Answer the y-coordinate with respect to a corresponding horizontal axis, if any; if none, answer the cartesian x"
| aCostume | (aCostume := self costume) isInWorld ifFalse: [^ self getY].
(aCostume referencePlayfield findA: VerticalNumberLineMorph) ifNotNil: [:aNumberLine | ^ aNumberLine verticalCoordinateOf: aCostume]. ^ self getY!
Item was changed: + ----- Method: Player>>getYear (in category 'etoys-calendar') ----- - ----- Method: Player>>getYear (in category '*Etoys-Squeakland-etoys-calendar') ----- getYear "Answer the selected year, as a number, e.g. 2011."
^ self costume renderedMorph date year!
Item was changed: + ----- Method: Player>>goToToday (in category 'etoys-calendar') ----- - ----- Method: Player>>goToToday (in category '*Etoys-Squeakland-etoys-calendar') ----- goToToday "Tell the calendar to use the current day as its selected dated."
self costume renderedMorph date: Date today!
Item was changed: + ----- Method: Player>>handUserPictureOfPenTrail (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>handUserPictureOfPenTrail (in category '*Etoys-Squeakland-slot getters/setters') ----- handUserPictureOfPenTrail "Called from the user-interface: hand the user a picture of the pen trail"
self getHasPenTrails ifFalse: [ ^ self inform: 'no pen trails present' translated]. self currentHand attachMorph: (SketchMorph new form: self getPenTrailGraphic).!
Item was changed: + ----- Method: Player>>hideNavigationBar (in category 'misc') ----- - ----- Method: Player>>hideNavigationBar (in category '*Etoys-Squeakland-misc') ----- hideNavigationBar "Hide the navigation bar at the top of the screen"
| tab | ((tab := costume world findA: SugarNavTab) notNil) ifTrue: [tab collapsedMode ifFalse: [tab hideNavBar]]!
Item was changed: + ----- Method: Player>>insertVertexAtCursor (in category 'vertices operation') ----- - ----- Method: Player>>insertVertexAtCursor (in category '*Etoys-Squeakland-vertices operation') ----- insertVertexAtCursor
self costume insertVertexAtCursor!
Item was changed: + ----- Method: Player>>isFillStyle: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>isFillStyle: (in category '*Etoys-Squeakland-slot getters/setters') ----- isFillStyle: prospective "Answer whether the argument is some kind of fill-style."
^ prospective notNil and: [prospective isSymbol not] !
Item was changed: + ----- Method: Player>>isInTrash (in category 'misc') ----- - ----- Method: Player>>isInTrash (in category '*Etoys-Squeakland-misc') ----- isInTrash "Return true if I am in the trash (ScrapsBook)"
| next | costume ifNil: [^ false]. next := costume. [(next := next owner) notNil] whileTrue: [(next hasProperty: #trash) ifTrue: [^ true]. (next hasProperty: #scraps) ifTrue: [^ true]]. ^ false !
Item was changed: + ----- Method: Player>>isOpaque: (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>isOpaque: (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- isOpaque: aBoolean self costume isOpaque: aBoolean!
Item was changed: + ----- Method: Player>>isStepping (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>isStepping (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- isStepping ^self costume isStepping!
Item was changed: + ----- Method: Player>>kedamaWorld (in category 'slot-kedama') ----- - ----- Method: Player>>kedamaWorld (in category '*Etoys-Squeakland-slot-kedama') ----- kedamaWorld
^ Project current world findDeeplyA: KedamaMorph !
Item was changed: + ----- Method: Player>>newPatchForSet (in category 'slot-kedama') ----- - ----- Method: Player>>newPatchForSet (in category '*Etoys-Squeakland-slot-kedama') ----- newPatchForSet
| f | f := KedamaPatchMorph newExtent: self costume renderedMorph dimensions. f assuredPlayer assureUniClass. f setNameTo: (Project current world unusedMorphNameLike: f innocuousName). f kedamaWorld: self costume renderedMorph. self createSlotForPatch: f. ^ f!
Item was changed: + ----- Method: Player>>newTurtleForSet (in category 'slot-kedama') ----- - ----- Method: Player>>newTurtleForSet (in category '*Etoys-Squeakland-slot-kedama') ----- newTurtleForSet
| m | m := KedamaTurtleMorph new openInWorld. self costume renderedMorph hasNoTurtleBreed ifTrue: [m color: Color red]. self useTurtle: m player. m setNameTo: (Project current world unusedMorphNameLike: m innocuousName). ^ m!
Item was changed: + ----- Method: Player>>playButtonHit (in category 'scripts-standard') ----- - ----- Method: Player>>playButtonHit (in category '*Etoys-Squeakland-scripts-standard') ----- playButtonHit "The play button was hit."
costume renderedMorph playButtonHit!
Item was changed: + ----- Method: Player>>playFromCursorTo: (in category 'MorphicExtras-Widgets') ----- - ----- Method: Player>>playFromCursorTo: (in category '*Etoys-Squeakland-MorphicExtras-Widgets') ----- playFromCursorTo: aSampleNumber costume renderedMorph playFromCursorTo: aSampleNumber!
Item was changed: + ----- Method: Player>>playSound: (in category 'sound') ----- - ----- Method: Player>>playSound: (in category '*Etoys-Squeakland-sound') ----- playSound: frequency | newSound soundName | self stopSound. (soundName := self costume valueOfProperty: #sound) ifNotNil: [newSound := SoundService default soundNamed: soundName. newSound pitch: frequency]. (soundName isNil or: [soundName = 'silence']) ifTrue: [newSound := FMSound new soundForPitch: frequency dur: 100.0 loudness: 0.3]. self costume setProperty: #playingSound toValue: newSound. SoundPlayer resumePlaying: newSound quickStart: true!
Item was changed: + ----- Method: Player>>prependVertex (in category 'vertices operation') ----- - ----- Method: Player>>prependVertex (in category '*Etoys-Squeakland-vertices operation') ----- prependVertex
self costume prependVertex!
Item was changed: + ----- Method: Player>>printInTranscript (in category 'scripts-standard') ----- - ----- Method: Player>>printInTranscript (in category '*Etoys-Squeakland-scripts-standard') ----- printInTranscript "Print a line representing the receiver in the Transcript"
Project current world findATranscript: nil. Transcript cr; show: (Time now printString copyWithoutAll: '()'); space; show: self costume printString.!
Item was changed: + ----- Method: Player>>random: (in category 'slot-kedama') ----- - ----- Method: Player>>random: (in category '*Etoys-Squeakland-slot-kedama') ----- random: range "Answer a random integer between 0 and range."
<primitive: 'randomRange' module: 'KedamaPlugin2'> ^ range random
!
Item was changed: + ----- Method: Player>>recordButtonHit (in category 'scripts-standard') ----- - ----- Method: Player>>recordButtonHit (in category '*Etoys-Squeakland-scripts-standard') ----- recordButtonHit "The record button was hit."
costume renderedMorph recordButtonHit!
Item was changed: + ----- Method: Player>>referencePool (in category 'morphic worlds') ----- - ----- Method: Player>>referencePool (in category '*Etoys-Squeakland-as yet unclassified') ----- referencePool
self costume ifNotNil: [:c | c referenceWorld ifNotNil: [:w | ^ w referencePool]]. ^ nil. !
Item was changed: + ----- Method: Player>>regenerateScripts (in category 'scripting') ----- - ----- Method: Player>>regenerateScripts (in category '*Etoys-Squeakland-as yet unclassified') ----- regenerateScripts "This method is a temporary measure to ensure the project local References get in the compiled scripts. (When compiled methods are recompiled via #compileAll, it is done in a ways that it ignores the environment."
self class scripts do: [:e | (e instantiatedScriptEditorForPlayer: self) install]. !
Item was changed: + ----- Method: Player>>removeAllButCursor (in category 'vertices operation') ----- - ----- Method: Player>>removeAllButCursor (in category '*Etoys-Squeakland-vertices operation') ----- removeAllButCursor
self costume removeAllButCursor!
Item was changed: + ----- Method: Player>>removeFilters (in category 'sketch filters') ----- - ----- Method: Player>>removeFilters (in category '*Etoys-Squeakland-sketch filters') ----- removeFilters self sendMessageToCostume: #removeFilters!
Item was changed: + ----- Method: Player>>removeScriptNamed: (in category 'slots-kernel') ----- - ----- Method: Player>>removeScriptNamed: (in category '*Etoys-Squeakland-slots-kernel') ----- removeScriptNamed: aScriptName self class removeScriptNamed: aScriptName. !
Item was changed: + ----- Method: Player>>removeVertexAtCursor (in category 'vertices operation') ----- - ----- Method: Player>>removeVertexAtCursor (in category '*Etoys-Squeakland-vertices operation') ----- removeVertexAtCursor
self costume removeVertexAtCursor!
Item was changed: + ----- Method: Player>>removeWatchersOfSlotNamed: (in category 'translation') ----- - ----- Method: Player>>removeWatchersOfSlotNamed: (in category '*Etoys-Squeakland-translation') ----- removeWatchersOfSlotNamed: aName "A variable has been removed. Deal with possible watchers."
| aGetter | aGetter := aName asGetterSelector. self allPossibleWatchersFromWorld do: [:aWatcher | (aWatcher getSelector = aGetter) ifTrue: [aWatcher stopStepping. (aWatcher ownerThatIsA: WatcherWrapper) ifNotNil: [:aWrapper | aWrapper delete]]]!
Item was changed: + ----- Method: Player>>revertPage (in category 'card/stack commands') ----- - ----- Method: Player>>revertPage (in category '*Etoys-Squeakland-card/stack commands') ----- revertPage "If there is a saved version of the current page, revert to it."
| bm | ((bm := costume renderedMorph) isKindOf: BookMorph) ifFalse: [^ self]. bm revertPage!
Item was changed: + ----- Method: Player>>sayGraphic: (in category 'SpeechBubbles') ----- - ----- Method: Player>>sayGraphic: (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- sayGraphic: aGraphic self costume renderedMorph sayGraphic: aGraphic!
Item was changed: + ----- Method: Player>>sayNumber: (in category 'SpeechBubbles') ----- - ----- Method: Player>>sayNumber: (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- sayNumber: aNumber self costume renderedMorph say: aNumber asString!
Item was changed: + ----- Method: Player>>sayObject: (in category 'SpeechBubbles') ----- - ----- Method: Player>>sayObject: (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- sayObject: aPlayer self costume renderedMorph sayObject: aPlayer!
Item was changed: + ----- Method: Player>>sayText: (in category 'SpeechBubbles') ----- - ----- Method: Player>>sayText: (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- sayText: aString self costume renderedMorph say: aString!
Item was changed: + ----- Method: Player>>scriptEditorForNoCng: (in category 'scripts-kernel') ----- - ----- Method: Player>>scriptEditorForNoCng: (in category '*Etoys-Squeakland-scripts-kernel') ----- scriptEditorForNoCng: aSelector "Answer the receiver's script editor for aSelector. The script editor may be targeted to a sibiling of me. Do not change the script editor's receiver."
| aScriptEditor | aScriptEditor := (self class userScriptForPlayer: self selector: aSelector) instantiatedScriptEditorForPlayer: self. "creates an editor if none exists" aScriptEditor bringUpToDate. ^ aScriptEditor!
Item was changed: + ----- Method: Player>>setAttachmentEdge: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setAttachmentEdge: (in category '*Etoys-Squeakland-slot getters/setters') ----- setAttachmentEdge: aSymbol "Set the attachment edge to the given symbol"
^ costume renderedMorph attachmentEdge: aSymbol!
Item was changed: + ----- Method: Player>>setAttachmentOffset: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setAttachmentOffset: (in category '*Etoys-Squeakland-slot getters/setters') ----- setAttachmentOffset: aPoint "Set the attachment offset, a point"
^ costume renderedMorph attachmentOffset: aPoint!
Item was changed: + ----- Method: Player>>setBlue: (in category 'slots-color components') ----- - ----- Method: Player>>setBlue: (in category '*Etoys-Squeakland-slots-color components') ----- setBlue: aFloat "Set the blue component of my costume, if appropriate."
| aColor aValue | aColor := self getColor. aValue := (aFloat / 100 max: 0) min: 1. self setColor: (Color r: aColor red g: aColor green b: aValue alpha: aColor alpha)!
Item was changed: + ----- Method: Player>>setBlur: (in category 'sketch filters') ----- - ----- Method: Player>>setBlur: (in category '*Etoys-Squeakland-sketch filters') ----- setBlur: aNumber | number | self costume renderedMorph isSketchMorph ifFalse:[^nil]. number := aNumber asInteger min:100 max:0. self sendMessageToCostume: #filtersAdd: with: { #blur:form: . number}!
Item was changed: + ----- Method: Player>>setBrightness: (in category 'slots-color components') ----- - ----- Method: Player>>setBrightness: (in category '*Etoys-Squeakland-slots-color components') ----- setBrightness: aFloat "Set the brightness of my costume, if appropriate."
| aColor aValue | aColor := self getColor. aValue := (aFloat / 100 max: 0) min: 1. self setColor: (Color h: aColor hue s: aColor saturation v: aValue alpha: aColor alpha)!
Item was changed: + ----- Method: Player>>setBrightnessShift: (in category 'sketch filters') ----- - ----- Method: Player>>setBrightnessShift: (in category '*Etoys-Squeakland-sketch filters') ----- setBrightnessShift: aNumber | number | self costume renderedMorph isSketchMorph ifFalse:[^nil]. number := aNumber asInteger min:100 max:-100. self sendMessageToCostume: #filtersAdd: with: { #brightnessShift:form: . number}!
Item was changed: + ----- Method: Player>>setDateFormat: (in category 'etoys-calendar') ----- - ----- Method: Player>>setDateFormat: (in category '*Etoys-Squeakland-etoys-calendar') ----- setDateFormat: aSymbol self costume renderedMorph setProperty: #dateFormat toValue: aSymbol!
Item was changed: + ----- Method: Player>>setDay: (in category 'etoys-calendar') ----- - ----- Method: Player>>setDay: (in category '*Etoys-Squeakland-etoys-calendar') ----- setDay: aNumber "Set the day (of the month) as indicated."
^ self costume renderedMorph addDays: (aNumber - self getDay)!
Item was changed: + ----- Method: Player>>setFishEye: (in category 'sketch filters') ----- - ----- Method: Player>>setFishEye: (in category '*Etoys-Squeakland-sketch filters') ----- setFishEye: aNumber | number | self costume renderedMorph isSketchMorph ifFalse:[^nil]. number := aNumber asInteger max:-10. self sendMessageToCostume: #filtersAdd: with: { #fishEye:form: . number}!
Item was changed: + ----- Method: Player>>setFlashCursor: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setFlashCursor: (in category '*Etoys-Squeakland-slot getters/setters') ----- setFlashCursor: c "Set the cursor"
^ self setCursor:c!
Item was changed: + ----- Method: Player>>setForwardDirection: (in category 'slots-bonus for geometry') ----- - ----- Method: Player>>setForwardDirection: (in category '*Etoys-Squeakland-slots-bonus for geometry') ----- setForwardDirection: aNumber
self costume renderedMorph forwardDirection: aNumber!
Item was changed: + ----- Method: Player>>setGifPlaying: (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>setGifPlaying: (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- setGifPlaying: aBoolean self setCostumeSlot: #setStepping: toValue: aBoolean !
Item was changed: + ----- Method: Player>>setGraphCursor: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setGraphCursor: (in category '*Etoys-Squeakland-slot getters/setters') ----- setGraphCursor: c "Set the cursor"
^ self setCursor:c!
Item was changed: + ----- Method: Player>>setGraphic:rotationCenter: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setGraphic:rotationCenter: (in category '*Etoys-Squeakland-slot getters/setters') ----- setGraphic: aForm rotationCenter: aPoint "Set the receiver's graphic as indicated"
| aMorph | ^ ((aMorph := costume renderedMorph) isSketchMorph) ifTrue: [aMorph form: aForm rotationCenter: aPoint] ifFalse: [aMorph isPlayfieldLike ifTrue: [aMorph backgroundForm: aForm] ifFalse: ["what to do?"]]!
Item was changed: + ----- Method: Player>>setGreen: (in category 'slots-color components') ----- - ----- Method: Player>>setGreen: (in category '*Etoys-Squeakland-slots-color components') ----- setGreen: aFloat "Set the green component of my costume, if appropriate."
| aColor aValue | aColor := self getColor. aValue := (aFloat / 100 max: 0) min: 1. self setColor: (Color r: aColor red g: aValue b: aColor blue alpha: aColor alpha)!
Item was changed: + ----- Method: Player>>setHighlightColor: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setHighlightColor: (in category '*Etoys-Squeakland-slot getters/setters') ----- setHighlightColor: aColor "Set the costume's highlightColor."
costume highlightColor: aColor!
Item was changed: + ----- Method: Player>>setHue: (in category 'slots-color components') ----- - ----- Method: Player>>setHue: (in category '*Etoys-Squeakland-slots-color components') ----- setHue: aFloat "Set the hue of my costume, if appropriate."
| aColor aValue | aColor := self getColor. aValue := aFloat \ 360. self setColor: (Color h: aValue s: aColor saturation v: aColor brightness alpha: aColor alpha)!
Item was changed: + ----- Method: Player>>setHueShift: (in category 'sketch filters') ----- - ----- Method: Player>>setHueShift: (in category '*Etoys-Squeakland-sketch filters') ----- setHueShift: aNumber | number | self costume renderedMorph isSketchMorph ifFalse:[^nil]. number := aNumber asInteger min:360 max: -360. self sendMessageToCostume: #filtersAdd: with: {#hueShift:form:. number}!
Item was changed: + ----- Method: Player>>setImplicitSelfInTiles: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setImplicitSelfInTiles: (in category '*Etoys-Squeakland-slot getters/setters') ----- setImplicitSelfInTiles: aBoolean "Set the value of the implicitSelfInTiles preference."
Preferences setPreference: #implicitSelfInTiles toValue: aBoolean!
Item was changed: + ----- Method: Player>>setJulianDay: (in category 'etoys-calendar') ----- - ----- Method: Player>>setJulianDay: (in category '*Etoys-Squeakland-etoys-calendar') ----- setJulianDay: aNumber "Set the selected date to be the one corresponding to the argument provided, interpreted as a julian day."
^ self costume renderedMorph date: (DateAndTime julianDayNumber: aNumber) asDate!
Item was changed: + ----- Method: Player>>setLineCurved: (in category 'vertices operation') ----- - ----- Method: Player>>setLineCurved: (in category '*Etoys-Squeakland-vertices operation') ----- setLineCurved: aBoolean (aBoolean xor: self costume isCurve) ifTrue: [self costume toggleSmoothing]!
Item was changed: + ----- Method: Player>>setLineOpened: (in category 'vertices operation') ----- - ----- Method: Player>>setLineOpened: (in category '*Etoys-Squeakland-vertices operation') ----- setLineOpened: aBoolean (aBoolean xor: self costume isOpen) ifTrue: [self costume makeOpenOrClosed]!
Item was changed: + ----- Method: Player>>setLocation: (in category 'points') ----- - ----- Method: Player>>setLocation: (in category '*Etoys-Squeakland-points') ----- setLocation: val "Set the receiver's location; expected to be called with a point argument"
| aCostume | (val isKindOf: Point) ifFalse: [^ ScriptingSystem reportToUser: 'Expected a Point but instead got ' translated, val printString]. (aCostume := self costume) isInWorld ifFalse: [^ self]. aCostume isWorldOrHandMorph ifTrue: [^ self]. aCostume owner isHandMorph ifTrue: [^ self]. ^ aCostume x: val x y: val y!
Item was changed: + ----- Method: Player>>setLocationOnGraph: (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>setLocationOnGraph: (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- setLocationOnGraph: aPoint "Set the location of the object to a given value, with respect to the axes found in the host playfield."
self setXOnGraph: aPoint x asFloat. self setYOnGraph: aPoint y asFloat!
Item was changed: + ----- Method: Player>>setMagnification: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setMagnification: (in category '*Etoys-Squeakland-slot getters/setters') ----- setMagnification: aNumber "Set the magnification"
^ self costume renderedMorph magnification: aNumber!
Item was changed: + ----- Method: Player>>setMarksPerLegend: (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>setMarksPerLegend: (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- setMarksPerLegend: aValue self setCostumeSlot: #marksPerLegend: toValue: aValue!
Item was changed: + ----- Method: Player>>setMonth: (in category 'etoys-calendar') ----- - ----- Method: Player>>setMonth: (in category '*Etoys-Squeakland-etoys-calendar') ----- setMonth: aNumber "Set the month-number as indicated."
^ self costume renderedMorph addMonths: (aNumber - self getMonth)!
Item was changed: + ----- Method: Player>>setOpaque: (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>setOpaque: (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- setOpaque: aBoolean self setCostumeSlot: #isOpaque: toValue: aBoolean!
Item was changed: + ----- Method: Player>>setPageControlsAtTop: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setPageControlsAtTop: (in category '*Etoys-Squeakland-slot getters/setters') ----- setPageControlsAtTop: aBoolean "Set whether the book should show page controls at top."
| aBook | ^ (aBook := self bookEmbodied) ifNotNil: [aBook pageControlsAtTop: aBoolean]!
Item was changed: + ----- Method: Player>>setPageControlsShort: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setPageControlsShort: (in category '*Etoys-Squeakland-slot getters/setters') ----- setPageControlsShort: aBoolean "Set whether the book is set for short page controls currently"
| aBook | ^ (aBook := self bookEmbodied) ifNotNil: [aBook pageControlsShort: aBoolean]!
Item was changed: + ----- Method: Player>>setPageControlsShowing: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setPageControlsShowing: (in category '*Etoys-Squeakland-slot getters/setters') ----- setPageControlsShowing: aBoolean "Answer whether the book is current showing page-controls"
| aBook | ^ (aBook := self bookEmbodied) ifNotNil: [aBoolean ifTrue: [aBook showPageControls] ifFalse: [aBook hidePageControls]]!
Item was changed: + ----- Method: Player>>setPasteUpCursor: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setPasteUpCursor: (in category '*Etoys-Squeakland-slot getters/setters') ----- setPasteUpCursor: aNumber "Set my costume's cursor to the given number"
^ self setCursor: aNumber!
Item was changed: + ----- Method: Player>>setPasteUpGraphic: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setPasteUpGraphic: (in category '*Etoys-Squeakland-slot getters/setters') ----- setPasteUpGraphic: g "Answer a form representing the receiver's primary graphic"
^ self setGraphic: g!
Item was changed: + ----- Method: Player>>setPixelsPerUnit: (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>setPixelsPerUnit: (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- setPixelsPerUnit: aNumber self setCostumeSlot: #pixelsPerUnit: toValue: aNumber!
Item was changed: + ----- Method: Player>>setPrecisionFor:precision: (in category 'slots-user') ----- - ----- Method: Player>>setPrecisionFor:precision: (in category '*Etoys-Squeakland-slots-user') ----- setPrecisionFor: slotName precision: aNumber | val | (self slotInfo includesKey: slotName) ifTrue: ["it's a user slot"
(self slotInfoAt: slotName) floatPrecision: (Utilities floatPrecisionForDecimalPlaces: aNumber). self class allInstancesDo: [:anInst | aNumber == 0 ifFalse: [((val := anInst instVarNamed: slotName asString) isInteger) ifTrue: [anInst instVarNamed: slotName asString put: val asFloat]]. anInst updateAllViewers]] ifFalse: ["it's specifying a preference for precision on a system-defined numeric slot"
self noteDecimalPlaces: aNumber forGetter: slotName asGetterSelector. self updateAllViewers]!
Item was changed: + ----- Method: Player>>setRed: (in category 'slots-color components') ----- - ----- Method: Player>>setRed: (in category '*Etoys-Squeakland-slots-color components') ----- setRed: aFloat "Set the red component of my costume, if appropriate."
| aColor aValue | aColor := self getColor. aValue := (aFloat / 100 max: 0) min: 1. self setColor: (Color r: aValue g: aColor green b: aColor blue alpha: aColor alpha)!
Item was changed: + ----- Method: Player>>setRelativeScale: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setRelativeScale: (in category '*Etoys-Squeakland-slot getters/setters') ----- setRelativeScale: aBoolean costume relativeScale: aBoolean!
Item was changed: + ----- Method: Player>>setRotationCenter: (in category 'slots-bonus for geometry') ----- - ----- Method: Player>>setRotationCenter: (in category '*Etoys-Squeakland-slots-bonus for geometry') ----- setRotationCenter: aPointOfCartesian | morph world aPlayfield newPoint | morph := self costume renderedMorph. world := self costume world. world ifNil: [^ morph setRotationCenterFrom: aPointOfCartesian]. aPlayfield := morph referencePlayfield. newPoint := aPlayfield isNil ifTrue: [world cartesianOrigin x + aPointOfCartesian x @ (world cartesianOrigin y - aPointOfCartesian y)] ifFalse: [aPlayfield cartesianOrigin x + aPointOfCartesian x @ (aPlayfield cartesianOrigin y - aPointOfCartesian y)]. (self costume isKindOf: TransformMorph) ifTrue: [newPoint := self costume transform globalPointToLocal: newPoint]. morph setRotationCenterFrom: newPoint!
Item was changed: + ----- Method: Player>>setRotationCenterX: (in category 'slots-bonus for geometry') ----- - ----- Method: Player>>setRotationCenterX: (in category '*Etoys-Squeakland-slots-bonus for geometry') ----- setRotationCenterX: aNumber self setRotationCenter: aNumber @ self getRotationCenterY!
Item was changed: + ----- Method: Player>>setRotationCenterY: (in category 'slots-bonus for geometry') ----- - ----- Method: Player>>setRotationCenterY: (in category '*Etoys-Squeakland-slots-bonus for geometry') ----- setRotationCenterY: aNumber self setRotationCenter: self getRotationCenterX @ aNumber!
Item was changed: + ----- Method: Player>>setSamplingRate: (in category 'MorphicExtras-Widgets') ----- - ----- Method: Player>>setSamplingRate: (in category '*Etoys-Squeakland-MorphicExtras-Widgets') ----- setSamplingRate: aSymbol costume renderedMorph setSamplingRate: aSymbol!
Item was changed: + ----- Method: Player>>setSaturation: (in category 'slots-color components') ----- - ----- Method: Player>>setSaturation: (in category '*Etoys-Squeakland-slots-color components') ----- setSaturation: aFloat "Set the saturation of my costume, if appropriate."
| aColor aValue | aColor := self getColor. aValue := (aFloat / 100 max: 0) min: 1. self setColor: (Color h: aColor hue s: aValue v: aColor brightness alpha: aColor alpha)!
Item was changed: + ----- Method: Player>>setSaturationShift: (in category 'sketch filters') ----- - ----- Method: Player>>setSaturationShift: (in category '*Etoys-Squeakland-sketch filters') ----- setSaturationShift: aNumber | number | self costume renderedMorph isSketchMorph ifFalse:[^nil]. number := aNumber asInteger min:100 max: -100. self sendMessageToCostume: #filtersAdd: with: { #saturationShift:form: . number}!
Item was changed: + ----- Method: Player>>setSectorAngle: (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>setSectorAngle: (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- setSectorAngle: aNumber ^ self sendMessageToCostume: #angle: with: aNumber!
Item was changed: + ----- Method: Player>>setSectorRadius: (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>setSectorRadius: (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- setSectorRadius: aNumber ^ self sendMessageToCostume: #radius: with: aNumber!
Item was changed: + ----- Method: Player>>setShowFPS: (in category 'MorphicExtras-WebCam') ----- - ----- Method: Player>>setShowFPS: (in category '*Etoys-Squeakland-MorphicExtras-WebCam') ----- setShowFPS: aBoolean self setCostumeSlot: #setShowFPS: toValue: aBoolean!
Item was changed: + ----- Method: Player>>setShowNegativeArrowHead: (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>setShowNegativeArrowHead: (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- setShowNegativeArrowHead: aBoolean self setCostumeSlot: #showNegativeArrowHead: toValue: aBoolean!
Item was changed: + ----- Method: Player>>setShowPointer: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setShowPointer: (in category '*Etoys-Squeakland-slot getters/setters') ----- setShowPointer: aBoolean "Set the value of my costume's showPointer"
^ self costume renderedMorph showPointer: aBoolean!
Item was changed: + ----- Method: Player>>setShowZero: (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>setShowZero: (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- setShowZero: aBoolean self setCostumeSlot: #showZero: toValue: aBoolean!
Item was changed: + ----- Method: Player>>setShowingHandles: (in category 'vertices operation') ----- - ----- Method: Player>>setShowingHandles: (in category '*Etoys-Squeakland-vertices operation') ----- setShowingHandles: aBoolean (aBoolean xor: self costume showingHandles) ifTrue: [self costume toggleHandles]!
Item was changed: + ----- Method: Player>>setSound: (in category 'sound') ----- - ----- Method: Player>>setSound: (in category '*Etoys-Squeakland-sound') ----- setSound: aSound self costume setProperty: #sound toValue: aSound!
Item was changed: + ----- Method: Player>>setStarRatio: (in category 'vertices operation') ----- - ----- Method: Player>>setStarRatio: (in category '*Etoys-Squeakland-vertices operation') ----- setStarRatio: aInteger | int float | int := aInteger min: 100 max: 1. float := (100 / int) asFloat. ^ self costume starRatio: float!
Item was changed: + ----- Method: Player>>setStepping: (in category 'MorphicExtras-AdditionalMorphs') ----- - ----- Method: Player>>setStepping: (in category '*Etoys-Squeakland-MorphicExtras-AdditionalMorphs') ----- setStepping: aBoolean self costume setStepping:aBoolean
!
Item was changed: + ----- Method: Player>>setTextColor: (in category 'scripts-standard') ----- - ----- Method: Player>>setTextColor: (in category '*Etoys-Squeakland-scripts-standard') ----- setTextColor: aColor "Set the background color; the costume is presumed to be a text morph."
self costume renderedMorph selectionColor: aColor!
Item was changed: + ----- Method: Player>>setTextCursor: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setTextCursor: (in category '*Etoys-Squeakland-slot getters/setters') ----- setTextCursor: c "Set the cursor"
^ self setCursor:c!
Item was changed: + ----- Method: Player>>setTimer: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setTimer: (in category '*Etoys-Squeakland-slot getters/setters') ----- setTimer: seconds costume renderedMorph setProperty: #timerStart toValue: Time millisecondClockValue - (seconds * 1000) asInteger!
Item was changed: + ----- Method: Player>>setTrackPointer: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setTrackPointer: (in category '*Etoys-Squeakland-slot getters/setters') ----- setTrackPointer: aBoolean "Set the value of my costume's trackPointer"
^ self costume renderedMorph trackPointer: aBoolean!
Item was changed: + ----- Method: Player>>setUnitsPerMark: (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>setUnitsPerMark: (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- setUnitsPerMark: aValue self setCostumeSlot: #unitsPerMark: toValue: aValue!
Item was changed: + ----- Method: Player>>setUnitsPerTick: (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>setUnitsPerTick: (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- setUnitsPerTick: aNumber self setCostumeSlot: #unitsPerTick: toValue: aNumber!
Item was changed: + ----- Method: Player>>setUseFrameSize: (in category 'MorphicExtras-WebCam') ----- - ----- Method: Player>>setUseFrameSize: (in category '*Etoys-Squeakland-MorphicExtras-WebCam') ----- setUseFrameSize: aBoolean self setCostumeSlot:#setUseFrameSize: toValue:aBoolean!
Item was changed: + ----- Method: Player>>setVertexCursor: (in category 'vertices operation') ----- - ----- Method: Player>>setVertexCursor: (in category '*Etoys-Squeakland-vertices operation') ----- setVertexCursor: anInteger self costume vertexCursor: anInteger !
Item was changed: + ----- Method: Player>>setVerticesCount: (in category 'vertices operation') ----- - ----- Method: Player>>setVerticesCount: (in category '*Etoys-Squeakland-vertices operation') ----- setVerticesCount: aInteger self costume setVerticesCount: aInteger!
Item was changed: + ----- Method: Player>>setVideoGraphic: (in category 'slot getters/setters-Squeakland') ----- - ----- Method: Player>>setVideoGraphic: (in category '*Etoys-Squeakland-slot getters/setters') ----- setVideoGraphic: g "Answer a form representing the receiver's primary graphic"
^ self setGraphic: g!
Item was changed: + ----- Method: Player>>setWebCamIsOn: (in category 'MorphicExtras-WebCam') ----- - ----- Method: Player>>setWebCamIsOn: (in category '*Etoys-Squeakland-MorphicExtras-WebCam') ----- setWebCamIsOn: aBoolean self setCostumeSlot: #setWebCamIsOn: toValue: aBoolean!
Item was changed: + ----- Method: Player>>setWebCamOrientation: (in category 'MorphicExtras-WebCam') ----- - ----- Method: Player>>setWebCamOrientation: (in category '*Etoys-Squeakland-MorphicExtras-WebCam') ----- setWebCamOrientation: aSymbol costume renderedMorph setWebCamOrientation: aSymbol!
Item was changed: + ----- Method: Player>>setWebCamResolution: (in category 'MorphicExtras-WebCam') ----- - ----- Method: Player>>setWebCamResolution: (in category '*Etoys-Squeakland-MorphicExtras-WebCam') ----- setWebCamResolution: aSymbol costume renderedMorph setWebCamResolution: aSymbol!
Item was changed: + ----- Method: Player>>setWhirl: (in category 'sketch filters') ----- - ----- Method: Player>>setWhirl: (in category '*Etoys-Squeakland-sketch filters') ----- setWhirl: aNumber | number | self costume renderedMorph isSketchMorph ifFalse:[^nil]. number := aNumber truncated. self sendMessageToCostume: #filtersAdd: with: { #whirl:form: . number}!
Item was changed: + ----- Method: Player>>setXAtCursor: (in category 'vertices operation') ----- - ----- Method: Player>>setXAtCursor: (in category '*Etoys-Squeakland-vertices operation') ----- setXAtCursor: aNumber
^ self costume xAtCursor: aNumber!
Item was changed: + ----- Method: Player>>setXOnGraph: (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>setXOnGraph: (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- setXOnGraph: aNumber "Set the x-on-graph coordinate as indicated. If there is Horizontal Number Line in the same playfield, this is interpreted with reference to the position and scale of that number line; if not, this is no different from setX:"
| aCostume | (aCostume := self costume) isInWorld ifFalse: [^ self setX: aNumber].
(aCostume referencePlayfield findA: HorizontalNumberLineMorph) ifNotNil: [:aNumberLine | ^ aNumberLine setXOnGraphFor: aCostume to: aNumber]. ^ self getX!
Item was changed: + ----- Method: Player>>setYAtCursor: (in category 'vertices operation') ----- - ----- Method: Player>>setYAtCursor: (in category '*Etoys-Squeakland-vertices operation') ----- setYAtCursor: aNumber
^ self costume yAtCursor: aNumber!
Item was changed: + ----- Method: Player>>setYOnGraph: (in category 'morphicExtras-Charts') ----- - ----- Method: Player>>setYOnGraph: (in category '*Etoys-Squeakland-morphicExtras-Charts') ----- setYOnGraph: aNumber "Set the y-on-graph coordinate as indicated. If there is Vertical Number Line in the same playfield, this is interpreted with reference to the position and scale of that number line; if not, this is no different from setY:"
| aCostume | (aCostume := self costume) isInWorld ifFalse: [^ self setY: aNumber]. (aCostume referencePlayfield findA: VerticalNumberLineMorph) ifNotNil: [:aNumberLine | ^ aNumberLine setYOnGraphFor: aCostume to: aNumber].
^ self setY: aNumber!
Item was changed: + ----- Method: Player>>setYear: (in category 'etoys-calendar') ----- - ----- Method: Player>>setYear: (in category '*Etoys-Squeakland-etoys-calendar') ----- setYear: aNumber "Set the selected year as indicated."
self costume renderedMorph addMonths: 12 * (aNumber - self getYear)!
Item was changed: + ----- Method: Player>>showNavigationBar (in category 'misc') ----- - ----- Method: Player>>showNavigationBar (in category '*Etoys-Squeakland-misc') ----- showNavigationBar "Show the navigation bar at the top of the screen"
| tab | ((tab := costume world findA: SugarNavTab) notNil) ifTrue: [tab collapsedMode ifTrue: [tab showNavBar]]!
Item was changed: + ----- Method: Player>>shuffleVertices (in category 'vertices operation') ----- - ----- Method: Player>>shuffleVertices (in category '*Etoys-Squeakland-vertices operation') ----- shuffleVertices
self costume shuffleVertices!
Item was changed: + ----- Method: Player>>stopAttaching (in category 'SpeechBubbles') ----- - ----- Method: Player>>stopAttaching (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- stopAttaching self sendMessageToCostume: #target: with: nil!
Item was changed: + ----- Method: Player>>stopButtonHit (in category 'scripts-standard') ----- - ----- Method: Player>>stopButtonHit (in category '*Etoys-Squeakland-scripts-standard') ----- stopButtonHit "The stop button was hit."
costume renderedMorph stopButtonHit!
Item was changed: + ----- Method: Player>>stopSayingOrThinking (in category 'SpeechBubbles') ----- - ----- Method: Player>>stopSayingOrThinking (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- stopSayingOrThinking self costume renderedMorph stopSayingOrThinking!
Item was changed: + ----- Method: Player>>tearOffAttachedLabeledWatcherFor: (in category 'slots-user') ----- - ----- Method: Player>>tearOffAttachedLabeledWatcherFor: (in category '*Etoys-Squeakland-slots-user') ----- tearOffAttachedLabeledWatcherFor: aGetter "Open a following watcher for the given getter."
(FollowingWatcher new fancyForPlayer: self getter: aGetter) openInWorld!
Item was changed: + ----- Method: Player>>tearOffAttachedWatcherFor: (in category 'slots-user') ----- - ----- Method: Player>>tearOffAttachedWatcherFor: (in category '*Etoys-Squeakland-slots-user') ----- tearOffAttachedWatcherFor: aGetter "Open a following watcher for the given getter."
(FollowingWatcher new unlabeledForPlayer: self getter: aGetter) openInWorld!
Item was changed: + ----- Method: Player>>thinkGraphic: (in category 'SpeechBubbles') ----- - ----- Method: Player>>thinkGraphic: (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- thinkGraphic: aGraphic self costume renderedMorph thinkGraphic: aGraphic!
Item was changed: + ----- Method: Player>>thinkNumber: (in category 'SpeechBubbles') ----- - ----- Method: Player>>thinkNumber: (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- thinkNumber: aNumber self costume renderedMorph think: aNumber asString!
Item was changed: + ----- Method: Player>>thinkObject: (in category 'SpeechBubbles') ----- - ----- Method: Player>>thinkObject: (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- thinkObject: aPlayer self costume renderedMorph thinkObject: aPlayer!
Item was changed: + ----- Method: Player>>thinkText: (in category 'SpeechBubbles') ----- - ----- Method: Player>>thinkText: (in category '*Etoys-Squeakland-Etoys-SpeechBubbles') ----- thinkText: aString self costume renderedMorph think: aString!
Item was changed: + ----- Method: Player>>updateScriptsCategoryOfViewers (in category 'misc') ----- - ----- Method: Player>>updateScriptsCategoryOfViewers (in category '*Etoys-Squeakland-misc') ----- updateScriptsCategoryOfViewers "Update scripts category of all Viewers affeced by a change to the scripts of the receiver."
self allOpenViewersOnReceiverAndSiblings do: [:aViewer | aViewer updateScriptsCategory. aViewer isInWorld ifTrue: [aViewer assureScriptsCategoryShows]]!
Item was changed: + ----- Method: Player>>useBlueprintCanvas (in category 'misc') ----- - ----- Method: Player>>useBlueprintCanvas (in category '*Etoys-Squeakland-misc') ----- useBlueprintCanvas "Tell my costume to use a blueprint canvas."
costume world useBlueprintCanvas: true!
Item was changed: + ----- Method: Player>>useGrayLook (in category 'scripts-standard') ----- - ----- Method: Player>>useGrayLook (in category '*Etoys-Squeakland-scripts-standard') ----- useGrayLook "Install the standard 'gray look' for the sugar nav bar."
costume makeGray!
Item was changed: + ----- Method: Player>>useGreenLook (in category 'scripts-standard') ----- - ----- Method: Player>>useGreenLook (in category '*Etoys-Squeakland-scripts-standard') ----- useGreenLook "Install the standard 'green look' for the sugar nav bar."
costume makeGreen!
Item was changed: + ----- Method: Player>>useNormalCanvas (in category 'misc') ----- - ----- Method: Player>>useNormalCanvas (in category '*Etoys-Squeakland-misc') ----- useNormalCanvas "Tell my world to use a normal canvas."
costume world useBlueprintCanvas: false!
Item was changed: + ----- Method: Presenter>>allCurrentlyTickingScriptInstantiations (in category 'stubs') ----- - ----- Method: Presenter>>allCurrentlyTickingScriptInstantiations (in category '*Etoys-stubs') ----- allCurrentlyTickingScriptInstantiations "Answer a list of ScriptInstantiation objects representing all the scripts within the scope of the receiver which are currently ticking."
^ Array streamContents: [:aStream | self allExtantPlayers do: [:aPlayer | aPlayer instantiatedUserScriptsDo: [:aScriptInstantiation | aScriptInstantiation status == #ticking ifTrue: [aStream nextPut: aScriptInstantiation]]]]!
Item was changed: + ----- Method: Presenter>>allExtantPlayers (in category 'stubs') ----- - ----- Method: Presenter>>allExtantPlayers (in category '*Etoys-stubs') ----- allExtantPlayers ^#()!
Item was changed: + ----- Method: Presenter>>associatedMorph: (in category 'accessing') ----- - ----- Method: Presenter>>associatedMorph: (in category '*Etoys-accessing') ----- associatedMorph: m!
Item was changed: + ----- Method: Presenter>>browseAllScriptsTextually (in category 'stubs') ----- - ----- Method: Presenter>>browseAllScriptsTextually (in category '*Etoys-stubs') ----- browseAllScriptsTextually "Open a method-list browser on all the scripts in the project"
| aList aMethodList | self flushPlayerListCache. "Just to be certain we get everything"
(aList := self uniclassesAndCounts) size == 0 ifTrue: [^ self inform: 'there are no scripted players' translated]. aMethodList := OrderedCollection new. aList do: [:aPair | aPair first addMethodReferencesTo: aMethodList]. aMethodList size > 0 ifFalse: [^ self inform: 'there are no scripts in this project!!' translated]. SystemNavigation new browseMessageList: aMethodList name: 'All scripts in this project' autoSelect: nil
" ActiveWorld presenter browseAllScriptsTextually "!
Item was changed: + ----- Method: Presenter>>currentlyViewing: (in category 'stubs') ----- - ----- Method: Presenter>>currentlyViewing: (in category '*Etoys-stubs') ----- currentlyViewing: aPlayer ^false!
Item was changed: + ----- Method: Presenter>>drawingJustCompleted: (in category 'stubs') ----- - ----- Method: Presenter>>drawingJustCompleted: (in category '*Etoys-stubs') ----- drawingJustCompleted: aSketch!
Item was changed: + ----- Method: Presenter>>flushPlayerListCache (in category 'stubs') ----- - ----- Method: Presenter>>flushPlayerListCache (in category '*Etoys-stubs') ----- flushPlayerListCache!
Item was changed: + ----- Method: Presenter>>morph:droppedIntoPasteUpMorph: (in category 'stubs') ----- - ----- Method: Presenter>>morph:droppedIntoPasteUpMorph: (in category '*Etoys-stubs') ----- morph: aMorph droppedIntoPasteUpMorph: aPasteUpMorph!
Item was changed: + ----- Method: Presenter>>ownStandardPalette (in category 'stubs') ----- - ----- Method: Presenter>>ownStandardPalette (in category '*Etoys-stubs') ----- ownStandardPalette ^nil!
Item was changed: + ----- Method: Presenter>>positionStandardPlayer (in category 'stubs') ----- - ----- Method: Presenter>>positionStandardPlayer (in category '*Etoys-stubs') ----- positionStandardPlayer!
Item was changed: + ----- Method: Presenter>>viewMorph: (in category 'stubs') ----- - ----- Method: Presenter>>viewMorph: (in category '*Etoys-stubs') ----- viewMorph: aMorph aMorph inspect. !
Item was changed: + ----- Method: Presenter>>viewObjectDirectly: (in category 'stubs') ----- - ----- Method: Presenter>>viewObjectDirectly: (in category '*Etoys-stubs') ----- viewObjectDirectly: aMorph aMorph inspect. !
Item was changed: + ----- Method: StandardScriptingSystem>>absTileIconForm (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>absTileIconForm (in category '*Etoys-Squeakland-utilities') ----- absTileIconForm "Answer the form to use in the gold box for the abs tile item."
^ self formAtKey: #absTileIconForm!
Item was changed: + ----- Method: StandardScriptingSystem>>acceptableSlotNameFrom:forSlotCurrentlyNamed:asSlotNameIn:world: (in category 'universal slots & scripts') ----- - ----- Method: StandardScriptingSystem>>acceptableSlotNameFrom:forSlotCurrentlyNamed:asSlotNameIn:world: (in category '*Etoys-universal slots & scripts') ----- acceptableSlotNameFrom: originalString forSlotCurrentlyNamed: currentName asSlotNameIn: aPlayer world: aWorld "Produce an acceptable slot name, derived from the current name, for aPlayer. This method will always return a valid slot name that will be suitable for use in the given situation, though you might not like its beauty sometimes."
| aString stemAndSuffix proscribed stem suffix putative | aString := originalString asIdentifier: false. "get an identifier not lowercase" stemAndSuffix := aString stemAndNumericSuffix. proscribed := #(self super thisContext costume costumes dependents #true #false size), aPlayer class allInstVarNames, Vocabulary eToyVocabulary systemSlotNames.
stem := stemAndSuffix first. suffix := stemAndSuffix last. putative := aString asSymbol. [(putative ~~ currentName) and: [(proscribed includes: putative) or: [(aPlayer respondsTo: putative) or: [Smalltalk includesKey: putative]]]] whileTrue: [suffix := suffix + 1. putative := (stem, suffix printString) asSymbol]. ^ putative!
Item was changed: + ----- Method: StandardScriptingSystem>>addCustomEventFor:named:help:targetMorphClass: (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>addCustomEventFor:named:help:targetMorphClass: (in category '*Etoys-customevents-custom events') ----- addCustomEventFor: registrantClass named: aSymbol help: helpString targetMorphClass: targetClass | registration | registration := self customEventsRegistry at: aSymbol ifAbsentPut: [ IdentityDictionary new ]. registration at: registrantClass put: { helpString. targetClass }. !
Item was changed: + ----- Method: StandardScriptingSystem>>addUserCustomEventNamed:help: (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>addUserCustomEventNamed:help: (in category '*Etoys-customevents-custom events') ----- addUserCustomEventNamed: aSymbol help: helpString self currentWorld addUserCustomEventNamed: aSymbol help: helpString. "Vocabulary addStandardVocabulary: UserCustomEventNameType new." Vocabulary customEventsVocabulary. SymbolListTile updateAllTilesForVocabularyNamed: #CustomEvents!
Item was changed: + ----- Method: StandardScriptingSystem>>allClassVarNamesInSystem (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>allClassVarNamesInSystem (in category '*Etoys-utilities') ----- allClassVarNamesInSystem "Compute and answer a set of all the class variable names known to the sytem from any class"
| aList | aList := OrderedCollection new. Object withAllSubclasses do: [:c | aList addAll: c allClassVarNames]. ^ aList asSet
"ScriptingSystem allClassVarNamesInSystem" !
Item was changed: + ----- Method: StandardScriptingSystem>>allKnownClassVariableNames (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>allKnownClassVariableNames (in category '*Etoys-utilities') ----- allKnownClassVariableNames "Answer a set of all the knwon class variable names in the system. This normally retrieves them from a cache, and at present there is no organized mechanism for invalidating the cache. The idea is to avoid, in the References scheme, names that may create a conflict"
^ ClassVarNamesInUse ifNil: [ClassVarNamesInUse := self allClassVarNamesInSystem]
"ClassVarNamesInUse := nil. Time millisecondsToRun: [ScriptingSystem allKnownClassVariableNames]" !
Item was changed: + ----- Method: StandardScriptingSystem>>anyButtonPressedTiles (in category 'parts bin') ----- - ----- Method: StandardScriptingSystem>>anyButtonPressedTiles (in category '*Etoys-parts bin') ----- anyButtonPressedTiles "Answer tiles representing the query 'is any button pressed?'"
^ self tilesForQuery: '(ActiveHand anyButtonPressed)' label: 'button down?' translated!
Item was changed: + ----- Method: StandardScriptingSystem>>arithmeticalOperatorsAndHelpStrings (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>arithmeticalOperatorsAndHelpStrings (in category '*Etoys-utilities') ----- arithmeticalOperatorsAndHelpStrings "Answer an array consisting of lists of the standard arithmetical operator tiles and of the corresponding balloon help for them"
^ #((+ - * / // \ max: min:) ('add' 'subtract' 'multiply' 'divide' 'divide & truncate' 'remainder when divided by' 'larger value' 'smaller value' )) translatedNoop!
Item was changed: + ----- Method: StandardScriptingSystem>>assureFlapOfLabel:withContents: (in category 'help in a flap') ----- - ----- Method: StandardScriptingSystem>>assureFlapOfLabel:withContents: (in category '*Etoys-Squeakland-help in a flap') ----- assureFlapOfLabel: aTitle withContents: aString "Answer an info flap with the given title and contents. If one exists in the project, use that, else create one & insert it in the world. Answer the flap tab."
| allFlapTabs aTab | allFlapTabs := Project current world localFlapTabs, Project current world extantGlobalFlapTabs. aTab := allFlapTabs detect: [:ft | ft flapID = aTitle] ifNone: [nil]. aTab ifNotNil: [^ aTab]. "already present"
aTab := self openInfoFlapWithLabel: aTitle helpContents: aString edge: #left. aTab bottom: Project current world bottom. self cleanUpFlapTabsOnLeft. aTab hideFlap. aTab referent show. aTab show. ^ aTab
" ScriptingSystem assureFlapOfLabel: 'Egg Sample' withContents: EventRollMorph basicNew helpString "!
Item was changed: + ----- Method: StandardScriptingSystem>>baseColor (in category 'script-control') ----- - ----- Method: StandardScriptingSystem>>baseColor (in category '*Etoys-Squeakland-tile colors') ----- baseColor ^ (Color r: 0.674 g: 0.91 b: 0.47)!
Item was changed: + ----- Method: StandardScriptingSystem>>benchmark:label:on: (in category 'benchmarks') ----- - ----- Method: StandardScriptingSystem>>benchmark:label:on: (in category '*Etoys-Squeakland-benchmarks') ----- benchmark: selector label: aString on: aStream "ScriptingSystem benchmark: #benchmarkPainter label: 'painter' on: Transcript. Transcript flush." | result trial | trial := 5. result := 0. trial timesRepeat: [result := result + (self perform: selector)]. aStream nextPutAll: aString; nextPut: $=; print: (result / 5) asFloat; space!
Item was changed: + ----- Method: StandardScriptingSystem>>benchmarkCategory (in category 'benchmarks') ----- - ----- Method: StandardScriptingSystem>>benchmarkCategory (in category '*Etoys-Squeakland-benchmarks') ----- benchmarkCategory "ScriptingSystem benchmarkCategory" | m v result world | world := Project current world. m := Morph new openInWorld. m openViewerForArgument. world doOneCycle. v := m player allOpenViewers first submorphs last. result := [v chosenCategorySymbol: #geometry. world doOneCycle] timeToRun. m delete. world doOneCycle. ^ result!
Item was changed: + ----- Method: StandardScriptingSystem>>benchmarkPainter (in category 'benchmarks') ----- - ----- Method: StandardScriptingSystem>>benchmarkPainter (in category '*Etoys-Squeakland-benchmarks') ----- benchmarkPainter "ScriptingSystem benchmarkPainter" | world result | world := Project current world. result := [world makeNewDrawing: nil at: 400 @ 300. world doOneCycle] timeToRun. (world findA: SketchEditorMorph) cancelOutOfPainting. world doOneCycle. ^ result!
Item was changed: + ----- Method: StandardScriptingSystem>>benchmarkScriptor (in category 'benchmarks') ----- - ----- Method: StandardScriptingSystem>>benchmarkScriptor (in category '*Etoys-Squeakland-benchmarks') ----- benchmarkScriptor "ScriptingSystem benchmarkScriptor" "(Picking up third one)" | result m | m := Morph new openInWorld. m openViewerForArgument. m player assureUniClass. m player newScriptorAround: nil. m player newScriptorAround: nil. result := [(m player newScriptorAround: nil) openInWorld. Project current world doOneCycle] timeToRun. m delete. Project current world doOneCycle. ^ result!
Item was changed: + ----- Method: StandardScriptingSystem>>benchmarkViewer (in category 'benchmarks') ----- - ----- Method: StandardScriptingSystem>>benchmarkViewer (in category '*Etoys-Squeakland-benchmarks') ----- benchmarkViewer "ScriptingSystem benchmarkViewer" | result m world | m := Morph new openInWorld. world := Project current world. result := [m openViewerForArgument. world doOneCycle] timeToRun. m delete. world doOneCycle. ^ result!
Item was changed: + ----- Method: StandardScriptingSystem>>biggerHandlesPreferenceChanged (in category 'universal slots & scripts') ----- - ----- Method: StandardScriptingSystem>>biggerHandlesPreferenceChanged (in category '*Etoys-Squeakland-utilities') ----- biggerHandlesPreferenceChanged "The biggerHandles preference was changed..."
| prefix aName form | prefix := Preferences biggerHandles ifTrue: ['Large'] ifFalse: ['Small']. #('Collapse' 'Debug' 'Dismiss' 'Drag' 'Dup' 'FontEmph' 'FontSize' 'FontStyle' 'Grab' 'Help' 'Menu' 'Paint' 'Pooh' 'Recolor' 'Rot' 'Scale' 'Tile' 'View' 'Script') do: [:stem | aName := 'Halo-', stem. form := ScriptingSystem formAtKey: (prefix, aName). form ifNil: [ScriptingSystem formDictionary removeKey: aName asSymbol ifAbsent: []] ifNotNil: [ScriptingSystem saveForm: form atKey: aName]].!
Item was changed: + ----- Method: StandardScriptingSystem>>borderColor (in category 'tile colors') ----- - ----- Method: StandardScriptingSystem>>borderColor (in category '*Etoys-Squeakland-tile colors') ----- borderColor ^ (UserInterfaceTheme current get: #borderColor for: #MenuMorph) ifNil: [(Color r: 0.2 g: 0.3 b: 0.9)]!
Item was changed: + ----- Method: StandardScriptingSystem>>buildPanelTitled: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>buildPanelTitled: (in category '*Etoys-Squeakland-utilities') ----- buildPanelTitled: aTitle "(ScriptingSystem buildPanelTitled: 'title') openInHand" | outer title aDismissButton | outer := OLPCHelpDisplayer newColumn. outer color: ScriptingSystem baseColor. outer borderWidth: 1. outer borderColor: ScriptingSystem borderColor. outer hResizing: #shrinkWrap. outer vResizing: #shrinkWrap. outer useRoundedCornersInEtoys. outer layoutInset: 3 @ 3. outer cellInset: 0 @ 0. title := AlignmentMorph newRow. title beTransparent. aDismissButton := outer tanOButton. title addMorphFront: aDismissButton. title addTransparentSpacerOfSize: 6 @ 0. title addMorphBack: (StringMorph contents: aTitle font: ScriptingSystem fontForTiles). outer addMorphBack: title. ^ outer!
Item was changed: + ----- Method: StandardScriptingSystem>>buttonDownTile (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>buttonDownTile (in category '*Etoys-utilities') ----- buttonDownTile "Answer a boolean-valued tile which reports whether the button is down"
^ self systemQueryPhraseWithActionString: '(ActiveHand anyButtonPressed)' labelled: 'button down?' translated!
Item was changed: + ----- Method: StandardScriptingSystem>>buttonExtent (in category 'buttons') ----- - ----- Method: StandardScriptingSystem>>buttonExtent (in category '*Etoys-Squeakland-buttons') ----- buttonExtent "ScriptingSystem buttonExtent" ^ (ScriptingSystem formAtKey: #TryIt) extent!
Item was changed: + ----- Method: StandardScriptingSystem>>buttonSpacer (in category 'buttons') ----- - ----- Method: StandardScriptingSystem>>buttonSpacer (in category '*Etoys-Squeakland-buttons') ----- buttonSpacer "ScriptingSystem buttonSpacer openInHand" | m | m := Morph new. m color: Color transparent. m extent: self buttonExtent. ^ m!
Item was changed: + ----- Method: StandardScriptingSystem>>buttonUpTile (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>buttonUpTile (in category '*Etoys-utilities') ----- buttonUpTile "Answer a boolean-valued tile which reports whether the button is up"
^ self systemQueryPhraseWithActionString: '(ActiveHand noButtonPressed)' labelled: 'button up?' translated!
Item was changed: + ----- Method: StandardScriptingSystem>>cleanUpFlapTabsOnLeft (in category 'help in a flap') ----- - ----- Method: StandardScriptingSystem>>cleanUpFlapTabsOnLeft (in category '*Etoys-Squeakland-help in a flap') ----- cleanUpFlapTabsOnLeft "Make sure the flap tabs on the left of the screen line up nicely, making best use of realestate."
| tabsOnLeft current | tabsOnLeft := ((Project current world localFlapTabs, Project current world extantGlobalFlapTabs) select: [:f | f edgeToAdhereTo = #left]) sort: [:a :b | a top <= b top]. current := SugarNavigatorBar showSugarNavigator ifTrue: [75] ifFalse: [0]. tabsOnLeft do: [:aTab | aTab top: (current min: Project current world height - aTab height). current := aTab bottom + 2]. " ScriptingSystem cleanUpFlapTabsOnLeft "!
Item was changed: + ----- Method: StandardScriptingSystem>>cleanupsForRelease (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>cleanupsForRelease (in category '*Etoys-utilities') ----- cleanupsForRelease "Miscellaneous space cleanups to do before a release." "EToySystem cleanupsForRelease"
Socket deadServer: ''. "Don't reveal any specific server name" HandMorph initialize. "free cached ColorChart" PaintBoxMorph initialize. "forces Prototype to let go of extra things it might hold" Smalltalk globals removeKey: #AA ifAbsent: []. Smalltalk globals removeKey: #BB ifAbsent: []. Smalltalk globals removeKey: #CC ifAbsent: []. Smalltalk globals removeKey: #DD ifAbsent: []. Smalltalk globals removeKey: #Temp ifAbsent: [].
ScriptingSystem reclaimSpace. Smalltalk cleanOutUndeclared. Smalltalk reclaimDependents. Smalltalk removeEmptyMessageCategories. Symbol rehash!
Item was changed: + ----- Method: StandardScriptingSystem>>colorBehindTiles (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>colorBehindTiles (in category '*Etoys-font & color choices') ----- colorBehindTiles ^ Color r: 0.903 g: 1.0 b: 0.903!
Item was changed: + ----- Method: StandardScriptingSystem>>colorForType: (in category 'tile colors') ----- - ----- Method: StandardScriptingSystem>>colorForType: (in category '*Etoys-tile colors') ----- colorForType: typeSymbol "Answer the color to use to represent the given type symbol"
true ifTrue: [^ self standardTileBorderColor].
typeSymbol capitalized = #Command ifTrue: [^ Color fromRgbTriplet: #(0.065 0.258 1.0)]. "Command is historical and idiosyncratic and should be regularized"
^ (Vocabulary vocabularyForType: typeSymbol) typeColor!
Item was changed: + ----- Method: StandardScriptingSystem>>colorFudge (in category 'tile colors') ----- - ----- Method: StandardScriptingSystem>>colorFudge (in category '*Etoys-tile colors') ----- colorFudge ^ 0.4!
Item was changed: + ----- Method: StandardScriptingSystem>>commandFeedback (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>commandFeedback (in category '*Etoys-Squeakland-font & color choices') ----- commandFeedback
^Color r: 1.0 g: 0.548 b: 0.452!
Item was changed: + ----- Method: StandardScriptingSystem>>customEventNamesAndHelpStringsFor: (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>customEventNamesAndHelpStringsFor: (in category '*Etoys-customevents-custom events') ----- customEventNamesAndHelpStringsFor: aPlayer | retval help helpStrings morph | morph := aPlayer costume renderedMorph. retval := OrderedCollection new. self customEventsRegistry keysAndValuesDo: [ :k :v | helpStrings := Array streamContents: [ :hsStream | v keysAndValuesDo: [ :registrant :array | (morph isKindOf: array second) ifTrue: [ help := String streamContents: [ :stream | v size > 1 ifTrue: [ stream nextPut: $(; nextPutAll: array second name translated; nextPut: $); space ]. stream nextPutAll: array first translated]. hsStream nextPut: help]]]. helpStrings isEmpty ifFalse: [retval add: { k. helpStrings } ]]. ^ retval sort: [ :a :b | a first < b first ]!
Item was changed: + ----- Method: StandardScriptingSystem>>customEventStati (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>customEventStati (in category '*Etoys-customevents-custom events') ----- customEventStati ^self globalCustomEventNames, self userCustomEventNames!
Item was changed: + ----- Method: StandardScriptingSystem>>customEventsRegistry (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>customEventsRegistry (in category '*Etoys-customevents-custom events') ----- customEventsRegistry ^Smalltalk globals at: #CustomEventsRegistry ifAbsentPut: [ IdentityDictionary new ].!
Item was changed: + ----- Method: StandardScriptingSystem>>customizeForEToyUsers: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>customizeForEToyUsers: (in category '*Etoys-utilities') ----- customizeForEToyUsers: aBoolean "If aBoolean is true, set things up for etoy users. If it's false, unset some of those things. Some things are set when switching into etoy mode but not reversed when switching out of etoy mode."
#( (allowEtoyUserCustomEvents no reverse) (balloonHelpEnabled yes dontReverse) (debugHaloHandle no reverse) (modalColorPickers yes dontReverse) (oliveHandleForScriptedObjects no dontReverse) (uniqueNamesInHalos yes reverse) (useUndo yes dontReverse) (infiniteUndo no dontReverse) (warnIfNoChangesFile no reverse) (warnIfNoSourcesFile no reverse)) do: [:trip | (aBoolean or: [trip third == #reverse]) ifTrue: [Preferences setFlag: trip first toValue: ((trip second == #yes) & aBoolean) | ((trip second == #no) & aBoolean not)]]!
Item was changed: + ----- Method: StandardScriptingSystem>>deletePrivateGraphics (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>deletePrivateGraphics (in category '*Etoys-form dictionary') ----- deletePrivateGraphics "ScriptingSystem deletePrivateGraphics" self deletePrivateGraphics: self privateGraphics afterStoringToFileNamed: 'disGraphics'!
Item was changed: + ----- Method: StandardScriptingSystem>>deletePrivateGraphics:afterStoringToFileNamed: (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>deletePrivateGraphics:afterStoringToFileNamed: (in category '*Etoys-form dictionary') ----- deletePrivateGraphics: nameList afterStoringToFileNamed: aFileName "This method is used to strip private graphics from the FormDictionary and store them on a file of the given name"
| replacement toRemove aReferenceStream | toRemove := Dictionary new. replacement := FormDictionary at: #Gets.
nameList do: [:aKey | | keySymbol | keySymbol := aKey asSymbol. (toRemove at: keySymbol put: (self formAtKey: keySymbol)). FormDictionary at: keySymbol put: replacement].
aReferenceStream := ReferenceStream fileNamed: aFileName. aReferenceStream nextPut: toRemove. aReferenceStream close!
Item was changed: + ----- Method: StandardScriptingSystem>>doesOperatorWantArrows: (in category 'universal slots & scripts') ----- - ----- Method: StandardScriptingSystem>>doesOperatorWantArrows: (in category '*Etoys-universal slots & scripts') ----- doesOperatorWantArrows: aSymbol aSymbol = #, ifTrue:[^ false]. ^ aSymbol isInfix or: [#(isDivisibleBy:) includes: aSymbol]!
Item was changed: + ----- Method: StandardScriptingSystem>>fontForAttachedWatchers (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>fontForAttachedWatchers (in category '*Etoys-Squeakland-Etoys-font & color choices') ----- fontForAttachedWatchers "Answer the font to use in following watchers"
^ StrikeFont familyName: 'BitstreamVeraSerif' size: 16!
Item was changed: + ----- Method: StandardScriptingSystem>>fontForEToyButtons (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>fontForEToyButtons (in category '*Etoys-Squeakland-font & color choices') ----- fontForEToyButtons "Answer the font to be used for the status buttons affiliated with a ScriptInstantiation in a Viewer or Scriptor, and with other buttons that are part of the basic etoy UI."
" ^ StrikeFont familyName: 'KomikaText' size: 28" ^ Preferences standardEToysButtonFont!
Item was changed: + ----- Method: StandardScriptingSystem>>fontForNameEditingInScriptor (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>fontForNameEditingInScriptor (in category '*Etoys-font & color choices') ----- fontForNameEditingInScriptor ^ Preferences standardEToysFont!
Item was changed: + ----- Method: StandardScriptingSystem>>fontForTiles (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>fontForTiles (in category '*Etoys-font & color choices') ----- fontForTiles ^ Preferences standardEToysFont!
Item was changed: + ----- Method: StandardScriptingSystem>>fontForViewerCategoryPopups (in category 'olpc') ----- - ----- Method: StandardScriptingSystem>>fontForViewerCategoryPopups (in category '*Etoys-Squeakland-olpc') ----- fontForViewerCategoryPopups "Answer the font to be used for the category-name at the top of each category-viewer pane."
^ Preferences standardEToysButtonFont!
Item was changed: + ----- Method: StandardScriptingSystem>>formAtKey: (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>formAtKey: (in category '*Etoys-form dictionary') ----- formAtKey: aString "Answer the form saved under the given key"
^((Symbol lookup: aString) ifNotNil: [ :aKey | FormDictionary at: aKey ifAbsent: [ FormDictionary at: #Cat ] ] ifNil: [ FormDictionary at: #Cat ]) magnifyBy: RealEstateAgent scaleFactor!
Item was changed: + ----- Method: StandardScriptingSystem>>formAtKey:extent:depth: (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>formAtKey:extent:depth: (in category '*Etoys-form dictionary') ----- formAtKey: aKey extent: extent depth: depth "ScriptingSystem saveForm: (TileMorph downPicture) atKey: 'downArrow'" ^ FormDictionary at: aKey asSymbol ifAbsent: [Form extent: extent depth: depth]!
Item was changed: + ----- Method: StandardScriptingSystem>>formDictionary (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>formDictionary (in category '*Etoys-form dictionary') ----- formDictionary ^FormDictionary!
Item was changed: + ----- Method: StandardScriptingSystem>>formPressedAtKey: (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>formPressedAtKey: (in category '*Etoys-Squeakland-form dictionary') ----- formPressedAtKey: aSymbol "Answer the form for pressed button. It is automatically generated if unavailable." "(ScriptingSystem formPressedAtKey: #TryIt) asMorph openInHand" | pressedName pressedImage | pressedName := (aSymbol , 'Pressed') asSymbol. ((FormDictionary includesKey: aSymbol) and: [(FormDictionary includesKey: pressedName) not]) ifTrue: [pressedImage := ((self formAtKey: aSymbol) blendColor: (Color black alpha: 0.3)) colorReduced. self saveForm: pressedImage atKey: pressedName]. ^ self formAtKey: pressedName!
Item was changed: + ----- Method: StandardScriptingSystem>>getterFeedback (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>getterFeedback (in category '*Etoys-Squeakland-font & color choices') ----- getterFeedback ^Color r: 1.0 g: 0.355 b: 0.839!
Item was changed: + ----- Method: StandardScriptingSystem>>globalCustomEventNames (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>globalCustomEventNames (in category '*Etoys-customevents-custom events') ----- globalCustomEventNames ^self customEventsRegistry keys asArray sort!
Item was changed: + ----- Method: StandardScriptingSystem>>globalCustomEventNamesFor: (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>globalCustomEventNamesFor: (in category '*Etoys-customevents-custom events') ----- globalCustomEventNamesFor: aPlayer | morph names | morph := aPlayer costume renderedMorph. names := OrderedCollection new. self customEventsRegistry keysAndValuesDo: [ :k :v | (v anySatisfy: [ :array | morph isKindOf: array second ]) ifTrue: [ names add: k ]]. ^names sort!
Item was changed: + ----- Method: StandardScriptingSystem>>goButton (in category 'script-control') ----- - ----- Method: StandardScriptingSystem>>goButton (in category '*Etoys-script-control') ----- goButton | aButton | aButton := ThreePhaseButtonMorph new. aButton offImage: (ScriptingSystem formAtKey: 'GoPic'); pressedImage: (ScriptingSystem formAtKey: 'GoPicOn'); image: (ScriptingSystem formAtKey: 'GoPicOn'); actionSelector: #goUp:with:; arguments: (Array with: nil with: aButton); actWhen: #buttonUp; target: self; setNameTo: 'Go Button'; setBalloonText: 'Resume running all paused scripts' translated. ^ aButton!
Item was changed: + ----- Method: StandardScriptingSystem>>goUp:with: (in category 'script-control') ----- - ----- Method: StandardScriptingSystem>>goUp:with: (in category '*Etoys-script-control') ----- goUp: evt with: aGoButton Cursor wait showWhile: [ aGoButton presenter startRunningScriptsFrom: aGoButton ]!
Item was changed: + ----- Method: StandardScriptingSystem>>helpStringForOperator: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>helpStringForOperator: (in category '*Etoys-utilities') ----- helpStringForOperator: anOperator "Answer the help string associated with the given operator. If none found, return a standard no-help-available reply"
^ (self helpStringOrNilForOperator: anOperator) ifNil: ['Sorry, no help available here' translated] "This should never be seen, but is provided as a backstop"!
Item was changed: + ----- Method: StandardScriptingSystem>>helpStringOrNilFor: (in category 'help dictionary') ----- - ----- Method: StandardScriptingSystem>>helpStringOrNilFor: (in category '*Etoys-help dictionary') ----- helpStringOrNilFor: aSymbol "If my HelpStrings dictionary has an entry at the given symbol, answer that entry's value, else answer nil" HelpStrings at: aSymbol ifPresent:[:string | ^ string translated]. ^ nil!
Item was changed: + ----- Method: StandardScriptingSystem>>helpStringOrNilForOperator: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>helpStringOrNilForOperator: (in category '*Etoys-utilities') ----- helpStringOrNilForOperator: anOperator "Answer the help string associated with the given operator, nil if none found."
| anIndex opsAndHelp | (anIndex := (opsAndHelp := self arithmeticalOperatorsAndHelpStrings) first indexOf: anOperator) > 0 ifTrue: [^ (opsAndHelp second at: anIndex) translated].
(anIndex := (opsAndHelp := self numericComparitorsAndHelpStrings) first indexOf: anOperator) > 0 ifTrue: [^ (opsAndHelp second at: anIndex) translated].
(anIndex := (opsAndHelp := self numericFunctionsAndHelpStrings) first indexOf: anOperator) > 0 ifTrue: [^ (opsAndHelp second at: anIndex) translated].
^ nil!
Item was changed: + ----- Method: StandardScriptingSystem>>holderWithAlphabet (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>holderWithAlphabet (in category '*Etoys-utilities') ----- holderWithAlphabet "Answer a fully instantiated Holder that has submorphs that represent the letters of the uppercase alphabet, with each one having an 'index' slot which bears the letter's index in the alphabet -- 1 for A, 2 for B, etc. A few special characters are provided as per ack request 10/00; for these the index provided is rather arbitrarily assigned"
| aMorph aPlayer oneCharString aContainer aWrapper |
"ScriptingSystem holderWithAlphabet openInHand"
aContainer := self prototypicalHolder useRoundedCorners. aContainer borderColor: Color blue lighter.
aWrapper := AlignmentMorph new hResizing: #shrinkWrap; vResizing: #shrinkWrap; layoutInset: 0. aWrapper addMorphBack: (aMorph := TextMorph new contents: 'A'). aMorph beAllFont: ((TextStyle named: Preferences standardEToysFont familyName) fontOfSize: 24). aMorph width: 14; lock. aWrapper beTransparent; setNameTo: 'A'. aPlayer := aWrapper assuredPlayer. aPlayer addInstanceVariableNamed: #index type: #Number value: 1. aContainer addMorphBack: aWrapper. 2 to: 26 do: [:anIndex | | newMorph | newMorph := aWrapper usableSiblingInstance. newMorph player perform: #setIndex: with: anIndex. newMorph firstSubmorph contents: (oneCharString := ($A asciiValue + anIndex - 1) asCharacter asString). newMorph setNameTo: oneCharString.
aContainer addMorphBack: newMorph].
#(' ' '.' '#') with: #(27 28 29) do: [:aString :anIndex | | newMorph | newMorph := aWrapper usableSiblingInstance. newMorph player perform: #setIndex: with: anIndex. newMorph firstSubmorph contents: aString. aString = ' ' ifTrue: [newMorph setNameTo: 'space'. newMorph color: (Color gray alpha: 0.2)] ifFalse: [newMorph setNameTo: aString]. aContainer addMorphBack: newMorph].
aContainer setNameTo: 'alphabet'. aContainer isPartsBin: true. aContainer enableDrop: false. aContainer indicateCursor: false; width: 162. aContainer color: (Color r: 0.839 g: 1.0 b: 1.0). "Color fromUser" ^ aContainer!
Item was changed: + ----- Method: StandardScriptingSystem>>informScriptingUser: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>informScriptingUser: (in category '*Etoys-utilities') ----- informScriptingUser: aString "This provides a hook for logging messages that the user or the developer may wish to see; at present it simply logs the message to the Transcript, with a standard prefix to signal their provenance. Such messages will fall on the floor if there is no Transcript window open"
Transcript cr; show: 'SCRIPT NOTE: ', aString!
Item was changed: + ----- Method: StandardScriptingSystem>>initializeHelpStrings (in category 'help dictionary') ----- - ----- Method: StandardScriptingSystem>>initializeHelpStrings (in category '*Etoys-help dictionary') ----- initializeHelpStrings "Initialize the data structure that determines, for the etoy system, help messages for various scripting elements. The structure is built up by letting every Morph subclass contribute elements simply by implementing method #helpContributions. Consult implementors of #helpContributions for examples of how this goes."
"ScriptingSystem initializeHelpStrings"
| aDictionary | aDictionary := IdentityDictionary new. "For safety, the new copy is built up in this temp first, so that if an error occurs during the creation of the structure, the old version will remain remain in place"
Morph withAllSubclasses do: [:aClass | (aClass class includesSelector: #helpContributions) ifTrue: [aClass helpContributions do: [:pair | aDictionary at: pair first put: pair second]]].
HelpStrings := aDictionary!
Item was changed: + ----- Method: StandardScriptingSystem>>initializeLargeHaloIcons (in category 'universal slots & scripts') ----- - ----- Method: StandardScriptingSystem>>initializeLargeHaloIcons (in category '*Etoys-Squeakland-utilities') ----- initializeLargeHaloIcons "Store the bitmaps created by update 1179LargeHalo separately in the form dictionary so they can be restored dynamicaly if smaller halos are at some point installed."
#(
('R0lGODlhHgAeAJEAAOfn/wAAAP///wAAACH5BAUUAAIALAAAAAAeAB4AAAJklI8Cy5sPVZst QoqZPbnr6IXAhQWmOCaZeYZqxwYiF8azVLMunrcZD/BNbKiFjkIsJhlLVLPpjEmFxeAUqrwe q0wttcKVYgxc6/ZTNlNp4fOrLXO805952kJPbbgbe6cPMrZRAAA7' 'Debug')
('R0lGODlhHgAeAKIAAP////7+//Pz/4CA/wAA/////wAAAAAAACH5BAUUAAUALAAAAAAeAB4A AAOTWLpc9PC1SV28sVLMoV7cAIxAp3Ek2REbRg5r1rhjfM20jYF6L1kYQWBILAoINVmnyCQi k5LVcBl4qHRTTvYJu0AJ28tWVPKWH+FI+Gs9g6taeJvWfVMjbAIZkubLY1d9aH83eDVNTSZA c0KIQ0ccCj4+PD55P5U2Vzc4MWRuMp1mKYotowB1nB+TLB8MlK6mqhUJADs=' 'Rot')
('R0lGODlhHgAeAJEAAP+cMQAAAf///wAAACH5BAUUAAIALAAAAAAeAB4AAAJclI8Cy5sPVZst QoqZPbnr6IXAJYZPaSKoyK2sxATyTNd0BS/2blcUD5SFZiWixzgUHpXJQLPIzCCXTmqwZ73e fA3tDud6hVO5Ma5l/qjS6nXa8t6UyfJ5pk6iyAsAOw==' 'Tile')
('R0lGODlhHgAeAKIAAAAAAAD//wB/fwB/gP///wAAAAAAAAAAACH5BAUUAAQALAAAAAAeAB4A AAOHSLpM8fC1SV28sVLMoV5d6FViGWxmOaUqUwqw0FoYYN+43Sl17uMYHuRnGwyIgEwEuSRy mBfo8Ca7DTBHnQD4wMkCVuztsR2DqV1zUxcos8+2LzfNdifXALk1W5/jkVInf4A5GTRThGoj HYk7QiExXyENLCIrlY6UmBcamyMfmB+aJqIkHKIJADs=' 'View')
('R0lGODlhHgAeAJEAAAAACP///3Z2ef///yH5BAUUAAMALAAAAAAeAB4AAAKAnI8Dy5sPVZst QhpyoPZQoGmf9YXh+JTmySXYarbepAmrncnvBuCZsBBNDLTcpyFkEBnJI9PoQEKdUl7RSr1q s8emF8YKTkFQcLj55I2fYqx2LSa7MXFVkNOd11v5Psr/cjRTBFiBEGg35HJlJnNY1Wh4wYXS QanU8ciVGSHYUQAAOw==' 'Grab')
('R0lGODlhHgAeAJEAAJkzAP///8zMzAAAACH5BAUUAAIALAAAAAAeAB4AAAJzlI8Cy5sPVZst QoqZPbnr6IXAJYYPE6Qqpa4O0rQpK1fGNJf5hwclsHv1FrIa0FehEYuuoMh5/CmH0hjSWsVS s9FtFgr15JjNq4ZKHptHEtS647xpn2uOu0XDf+xHvdV/wjVBIshGmLUh95MIU8J4aGNRAAA7' 'Drag')
('R0lGODlhHgAeAJEAAAD/AAAAAP///wAAACH5BAUUAAIALAAAAAAeAB4AAAJrlI8Cy5sPVZst QoqZPbnr6IXAJYZPaSJNwLYu63HrS6cTjOGdcQeZnpHMZjSXCFh8HX0MHJLpeS6kISo1CgU4 s8BfsjWsfq8asXfCw54rQu8YnXZ/2TJUMGHfnfJwEn+00SYSqFJC6NcXUQAAOw==' 'Dup')
('R0lGODlhHgAeAKIAAAAAAMz//2d/f5Cysv///wAAAAAAAAAAACH5BAUUAAQALAAAAAAeAB4A AAOASLpM8fC1SV28sVLMoV7YIAAkIAyYhpVsmU5rK7/MJd/A1VwDK0SjEiqjiJE4QdPL+OOw ljzS0JjTda6PUhPLzQq73RaYKx5fy2bnM41cs6nbqwXrls+vwXin+LbfOwNTfnwdeVgwgCyC OoghinsVhSR6Hh9/D4EcljVgmxuaHwkAOw==' 'Help')
('R0lGODlhHgAeAJEAAP//AAAAAP///wAAACH5BAUUAAIALAAAAAAeAB4AAAJ1lI8Cy5sPVZst QoqZPbnr6IXAJYYPE6Tqui7px6Hs/AK1Y0w3Vu+jJPP0ApNcw6cj2pQaCvKofCaFUWZH6qqK sMvs1urUhrjDL9U7ps3QlaS61a0AS1M5nQeOZd80uZ6vBqN3R0FC6HdyiLNBuJFA5wiC4VgA ADs=' 'Scale')
('R0lGODlhHgAeAJEAAJycnAAAAP///wAAACH5BAUUAAIALAAAAAAeAB4AAAJplI8Cy5sPVZst QoqZPbnr6IXAJYZPaSJUwLZBya1uC0vTDNAp5jJ6Z7uxhC9UYygrGnNI4nLxOzaNUd8UVYVe S1mmkrr1VrjbnwE7jZ7RxWqM3Kuo2N9RYrklPT/652aN8jcnItgnZ1EAADs=' 'Paint')
('R0lGODlhHgAeAJEAAM7/nAAAAP///wAAACH5BAUUAAIALAAAAAAeAB4AAAJrlI8Cy5sPVZst QoqZPbnr6IXAFQbmeX6IiLaqIQJmyMUzLbGBCNs7HVvcgozWbUiUGYW/pBJjbJakxaUPSg26 qk5misubIMGeHrkxxpiZWN46/Syv2BT4ywy3Ox7dCqi/seYWKNhBSEIRWAAAOw==' 'FontSize')
('R0lGODlhHgAeAJEAAP/OzgAAAP///wAAACH5BAUUAAIALAAAAAAeAB4AAAJ3lI8Cy5sPVZst QoqZPbnr6IXAJYbPEqTqiq6qgzCu286f1KR50HoGpZPxAMHMb1JEDo2Y5K6k7AmhT+LSShWy tNuQjfsSBZPO0vhaFl+rHdy0uZ4c2dG2WwqMV+Zfujxm1fVGcZKFQWJ4U5i4MVfSCCgCifhn UQAAOw==' 'FontStyle')
('R0lGODlhHgAeAJEAAAAAAO+MKf///wAAACH5BAUUAAIALAAAAAAeAB4AAAJ0lI8Sy5sPVZst QoqZPbnr6IXBJYZPaSIMwLYuu7ztaDSyHN+OlN9z8JvUVr6ZC8PrATrB0DHT9DwpUWm1hwLq iDjmVvvF+LhZ8IvsSU7RnaGSCkurq9eKew1OccyT+k7Fx7XUdlImBGL4Z1G2kYDSiEjRWAAA Ow==' 'FontEmph')
('R0lGODlhHgAeAJEAAP///+8A7////wAAACH5BAUUAAIALAAAAAAeAB4AAAJylI8Sy5sPVZst QoqZPbnr6IXBJTbAWSXlcrbAx3kv67ZwaNduKuo63/OhKiWhbcXI/ZC0WaDGbE6OTGpzuLI+ UdqOlurEYaUiSTK8RWcM03B3bU6f1Z2Y8g23p8ehxzw64scCaAHosBFXhhijuKiCgVgAADs=' 'Recolor')
('R0lGODlhHgAeAJEAAMb/xgAAAf///wAAACH5BAUUAAIALAAAAAAeAB4AAAJclI8Cy5sPVZst QoqZPbnr6IXAJYZPaSKoyK2sxATyTNd0BS/2blcUD5SFZiWixzgUHpXJQLPIzCCXTmqwZ73e fA3tDud6hVO5Ma5l/qjS6nXa8t6UyfJ5pk6iyAsAOw==' 'Script')
) do: [: pair | ScriptingSystem saveForm: ((GIFReadWriter on: (Base64MimeConverter mimeDecodeToBytes: pair first readStream) readStream) nextImage) atKey: ('LargeHalo-', pair second) asSymbol].
ScriptingSystem formDictionary at: #'LargeHalo-Dismiss' put: (ScriptingSystem formDictionary at: #PinkX).
ScriptingSystem formDictionary at: #'LargeHalo-Collapse' put: (ScriptingSystem formDictionary at: #TanO).
ScriptingSystem formDictionary at: #'LargeHalo-Menu' put: (ScriptingSystem formDictionary at: #MenuIcon).
" ScriptingSystem initializeLargeHaloIcons. "!
Item was changed: + ----- Method: StandardScriptingSystem>>initializeSmallHaloIcons (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>initializeSmallHaloIcons (in category '*Etoys-Squeakland-utilities') ----- initializeSmallHaloIcons "Build the old, smaller halo icons and stash them in the form dictionary under namees prefixed by 'Small'"
#( 'Debug' 'Dismiss' 'Rot' 'Menu' 'Tile' 'View' 'Grab' 'Drag' 'Dup' 'Help' 'Scale' 'Paint' 'FontSize' 'FontStyle' 'FontEmph' 'Recolor') with: #(
( 0 0 0 50331648 25165824 12582912 281018368 415236096 264241152 132120576 7340032 3670016 1572864 0 0 0) ( 0 0 0 0 204472320 242221056 132120576 62914560 62914560 132120576 242221056 204472320 0 0 0 0) ( 0 0 25165824 33554432 0 132120576 69730304 606339072 606339072 337641472 132120576 0 4194304 25165824 0 0) ( 0 0 0 267386880 267386880 267386880 135266304 267386880 135266304 267386880 135266304 267386880 0 0 0 0) ( 0 0 0 0 0 536346624 536346624 404226048 404226048 536346624 536346624 0 0 0 0 0) ( 0 0 0 0 132120576 486014976 770965504 1341259776 669253632 467140608 132120576 0 0 0 0 0) ( 0 25165824 25165824 37748736 69206016 135266304 268959744 669253632 338165760 204472320 69206016 69206016 132120576 0 0 0) ( 0 0 0 473432064 268959744 401080320 69206016 69206016 69206016 69206016 401080320 268959744 473432064 0 0 0) ( 0 0 0 0 528482304 276824064 284688384 277348352 285736960 520617984 17301504 33030144 0 0 0 0) ( 0 0 62914560 132120576 204472320 204472320 3145728 6291456 12582912 25165824 25165824 0 25165824 25165824 0 0) ( 0 0 0 0 265289728 139460608 139460608 139460608 139460608 265289728 1048576 267386880 0 0 0 0) ( 0 0 0 402653184 503316480 192937984 213909504 73400320 103809024 51904512 25690112 14155776 7340032 0 0 0) ( 0 0 0 15728640 8388608 8388608 8388608 243269632 148897792 142606336 209715200 142606336 142606336 0 0 0) ( 0 0 0 0 527958016 155189248 138412032 171966464 242221056 171966464 138412032 138412032 473956352 0 0 0) ( 0 0 0 0 532414464 530579456 404750336 406847488 511180800 507510784 411041792 411041792 411041792 0 0 0) ( 0 0 0 1048576 7864320 66060288 32505856 39845888 73400320 144703488 285212672 301989888 469762048 0 0 0)) do: [:name :array | ScriptingSystem saveForm: (Form extent: 16@16 depth: 1 fromArray: array offset: 0@0) atKey: ('SmallHalo-', name)].
ScriptingSystem saveForm: (Form extent: 10@16 depth: 1 fromArray: #( 0 0 0 0 503316480 2130706432 1635778560 3246391296 3246391296 3246391296 3808428032 2130706432 1006632960 0 0 0) offset: 0@0 ) atKey: 'SmallHalo-Collapse'.
ScriptingSystem saveForm: ((ColorForm extent: 16@16 depth: 1 fromArray: #( 0 0 0 473432064 536346624 229638144 267386880 106954752 62914560 132120576 267386880 536346624 511180800 0 0 0) offset: 0@0) colorsFromArray: #(#(1.0 1.0 1.0) #(0.0 0.0 0.004) ) ) atKey: 'SmallHalo-Pooh'.
" ScriptingSystem initializeSmallHaloIcons "!
Item was changed: + ----- Method: StandardScriptingSystem>>inspectFormDictionary (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>inspectFormDictionary (in category '*Etoys-form dictionary') ----- inspectFormDictionary "ScriptingSystem inspectFormDictionary" GraphicalDictionaryMenu openOn: FormDictionary withLabel: 'Testing One Two Three'!
Item was changed: + ----- Method: StandardScriptingSystem>>installDevelopmentFontsAndPreferences (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>installDevelopmentFontsAndPreferences (in category '*Etoys-Squeakland-font & color choices') ----- installDevelopmentFontsAndPreferences "Reinstates some of the standard olpc font choices. This is for private use by developers who may have reset some fonts for the benefit of development work."
Preferences setListFontTo: (StrikeFont familyName: 'Accuny' size: 18). Preferences setButtonFontTo: (StrikeFont familyName: 'Accuny' size: 9). Preferences disable: #inboardScrollbars. Preferences disable: #scrollBarsOnRight.
Preferences disable: #mouseOverHalos. Preferences disable: #biggerHandles.
" ScriptingSystem installDevelopmentFontsAndPreferences. "!
Item was changed: + ----- Method: StandardScriptingSystem>>installOLPCFontsAndPreferences (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>installOLPCFontsAndPreferences (in category '*Etoys-Squeakland-font & color choices') ----- installOLPCFontsAndPreferences "Assures that some of the standard olpc font and scrolling choices are installed. This is for private use by developers who may have changed some font and scrolling preferences, for the benefit of development work."
Preferences restoreDefaultFonts.
Preferences enable: #inboardScrollbars. Preferences enable: #scrollBarsOnRight.
Preferences enable: #mouseOverHalos. Preferences enable: #biggerHandles.
Preferences setParameter: #fontForBlueFileListTitle to: ((StrikeFont familyName: 'Accujen' size: 30) emphasized: 1). Preferences setParameter: #fontForBlueFileListButtons to: ((StrikeFont familyName: 'Accujen' size: 22) emphasized: 1).
false ifTrue: [ScriptingSystem installOLPCFontsAndPreferences] "to have a sender"
" ScriptingSystem installOLPCFontsAndPreferences. "!
Item was changed: + ----- Method: StandardScriptingSystem>>installSolidMenuForm (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>installSolidMenuForm (in category '*Etoys-form dictionary') ----- installSolidMenuForm "ScriptingSystem installSolidMenuForm" self saveForm: (Form extent: 14@16 depth: 16 fromArray: #( 1 0 0 0 0 0 0 65537 65536 0 0 0 65537 0 65537 65537 65537 65537 65537 65537 65536 65537 65537 65537 65537 65537 1600061441 65536 65537 1600085855 1600085855 1600085855 1600085855 1600061441 65536 65537 1600085855 65537 65537 65537 65537 65536 65537 1600085855 65537 65537 65537 1600061441 65536 65537 1600085855 1600085855 1600085855 1600085855 1600085855 65537 65537 1600085855 65537 65537 65537 1600085855 65537 65537 1600085855 1600061441 65537 65537 89951 65537 65537 1600085855 1600085855 1600085855 1600085855 1600085855 65537 65537 1600085855 1600061441 65537 65537 65537 65537 65537 1600085855 65537 65537 65537 65536 65537 65537 65537 65537 65537 65537 65537 65537 1 65537 65537 65537 65537 65537 65536 0 65536 0 0 0 0 0) offset: 0@0) atKey: 'SolidMenu'!
Item was changed: + ----- Method: StandardScriptingSystem>>macroBenchmark (in category 'benchmarks') ----- - ----- Method: StandardScriptingSystem>>macroBenchmark (in category '*Etoys-Squeakland-benchmarks') ----- macroBenchmark "Transcript cr; show: ScriptingSystem macroBenchmark" | writer | Smalltalk garbageCollect. writer := '' writeStream. writer nextPutAll: '#' , SystemVersion current highestUpdate printString; space. writer nextPutAll: 'memory='. writer print: self memory; space. writer nextPutAll: 'display='. writer nextPutAll: Display width printString , 'x' , Display height printString , 'x' , Display depth printString; space. self benchmark: #benchmarkPainter label: 'painter' on: writer. self benchmark: #benchmarkViewer label: 'viewer' on: writer. self benchmark: #benchmarkScriptor label: 'scriptor' on: writer. self benchmark: #benchmarkCategory label: 'category' on: writer. ^ writer contents!
Item was changed: + ----- Method: StandardScriptingSystem>>memory (in category 'benchmarks') ----- - ----- Method: StandardScriptingSystem>>memory (in category '*Etoys-Squeakland-benchmarks') ----- memory ^ SmalltalkImage current getVMParameters at: 3!
Item was changed: + ----- Method: StandardScriptingSystem>>mergeGraphicsFrom: (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>mergeGraphicsFrom: (in category '*Etoys-form dictionary') ----- mergeGraphicsFrom: aDictionary "aDictionary is assumed to hold associations of the form <formName> -> <form>. Merge the graphics held by that dictionary into the internal FormDictionary, overlaying any existing entries with the ones found in aDictionary"
aDictionary associationsDo: [:assoc | self saveForm: assoc value atKey: assoc key]
"works ok even if keys in aDictionary are strings rather than symbols"!
Item was changed: + ----- Method: StandardScriptingSystem>>nameForInstanceVariablesCategory (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>nameForInstanceVariablesCategory (in category '*Etoys-utilities') ----- nameForInstanceVariablesCategory "Answer the name to use for the viewer category that contains instance variables"
^ #variables "^ #'instance variables'"
"ScriptingSystem nameForInstanceVariablesCategory"!
Item was changed: + ----- Method: StandardScriptingSystem>>nameForScriptsCategory (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>nameForScriptsCategory (in category '*Etoys-utilities') ----- nameForScriptsCategory "Answer the name to use for the viewer category that contains scripts"
^ #scripts!
Item was changed: + ----- Method: StandardScriptingSystem>>newScriptingSpace (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>newScriptingSpace (in category '*Etoys-utilities') ----- newScriptingSpace "Answer a complete scripting space - raa 19 sept 2000 - experiment for Alan, a variant *not* in a window, now adopted as the only true scripting space"
^ self newScriptingSpace2!
Item was changed: + ----- Method: StandardScriptingSystem>>newScriptingSpace2 (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>newScriptingSpace2 (in category '*Etoys-utilities') ----- newScriptingSpace2 "Answer a complete scripting space"
| aTemplate aPlayfield aControl | (aTemplate := PasteUpMorph new) setNameTo: 'etoy'; extent: 638 @ 470; color: Color white; impartPrivatePresenter; setProperty: #automaticPhraseExpansion toValue: true; beSticky. aTemplate useRoundedCorners; borderWidth: 2. aControl := ScriptingSystem scriptControlButtons setToAdhereToEdge: #bottomLeft. aControl beSticky; borderWidth: 0; beTransparent. aTemplate addMorphBack: aControl. aTemplate presenter addTrashCan.
aTemplate addMorph: (aPlayfield := PasteUpMorph new). aPlayfield setNameTo: 'playfield'; useRoundedCorners; setToAdhereToEdge: #topLeft; extent: 340@300; position: aTemplate topRight - (400@0); beSticky; automaticViewing: true; wantsMouseOverHalos: true. aTemplate presenter standardPlayfield: aPlayfield.
aTemplate setProperty: #tutorial toValue: true. ^ aTemplate
!
Item was changed: + ----- Method: StandardScriptingSystem>>noButtonPressedTiles (in category 'parts bin') ----- - ----- Method: StandardScriptingSystem>>noButtonPressedTiles (in category '*Etoys-parts bin') ----- noButtonPressedTiles "Answer tiles representing the query 'is no button pressed?'"
^ self tilesForQuery: '(ActiveHand noButtonPressed)' label: 'button up?' translated!
Item was changed: + ----- Method: StandardScriptingSystem>>numericComparitorsAndHelpStrings (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>numericComparitorsAndHelpStrings (in category '*Etoys-utilities') ----- numericComparitorsAndHelpStrings "Answer an array whose first element is the list of comparitors, and whose second element is a list of the corresponding help strings"
^ #((< <= = ~= > >= isDivisibleBy:) ('less than' 'less than or equal' 'equal' 'not equal' 'greater than' 'greater than or equal' 'divisible by' )) translatedNoop!
Item was changed: + ----- Method: StandardScriptingSystem>>numericFunctionsAndHelpStrings (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>numericFunctionsAndHelpStrings (in category '*Etoys-Squeakland-utilities') ----- numericFunctionsAndHelpStrings "Answer an array whose first element is the list of functions, and whose second element is a list of the corresponding help strings"
| table | table := self tableOfNumericFunctions. "<selector> <help-string> pairs" ^ Array with: (table collect: [:pr | pr first]) with: (table collect: [:pr | pr second])!
Item was changed: + ----- Method: StandardScriptingSystem>>openInfoFlapWithLabel:helpContents:edge: (in category 'help in a flap') ----- - ----- Method: StandardScriptingSystem>>openInfoFlapWithLabel:helpContents:edge: (in category '*Etoys-Squeakland-help in a flap') ----- openInfoFlapWithLabel: aTitle helpContents: aString edge: anEdge "Open an info flap with the given label, contents, and edge"
| aPlug outer leftStrip rightStrip titleRow aDismissButton aFlapTab | Preferences enable: #scrollBarsOnRight. Preferences enable: #inboardScrollbars.
aFlapTab := FlapTab new. aFlapTab assureExtension visible: false. aFlapTab referentMargin: 0 @ Project current world sugarAllowance. outer := HelpFlap newRow. outer assureExtension visible: false. outer clipSubmorphs: true. outer beTransparent. outer vResizing: #spaceFill; hResizing: #spaceFill. outer layoutInset: 0; cellInset: 0; borderWidth: 0. outer morphicLayerNumber: outer class navigatorLayer. leftStrip := Morph new beTransparent. leftStrip layoutInset: 0; cellInset: 0; borderWidth: 0. leftStrip width: 20. leftStrip hResizing: #rigid; vResizing: #spaceFill. outer addMorphBack: leftStrip. rightStrip := AlignmentMorph newColumn. rightStrip beTransparent. rightStrip layoutInset: 0; cellInset: 0; borderWidth: 0. outer addMorphBack: rightStrip. outer clipSubmorphs: true. titleRow := AlignmentMorph newRow. titleRow borderColor: Color veryVeryLightGray; borderWidth: 1. titleRow hResizing: #spaceFill; vResizing: #shrinkWrap. titleRow beTransparent. aDismissButton := aFlapTab tanOButton. aDismissButton actionSelector: #dismissViaHalo. titleRow addMorphFront: aDismissButton. titleRow addTransparentSpacerOfSize: 8 @ 0. titleRow addMorphBack: (StringMorph contents: aTitle font: Preferences standardEToysTitleFont). rightStrip addMorph: titleRow. aPlug := PluggableTextMorph new. aPlug width: 540. aPlug setText: aString. aPlug textMorph beAllFont: Preferences standardEToysFont. aPlug retractable: false; scrollBarOnLeft: false. aPlug hScrollBarPolicy: #never. aPlug borderColor: ScriptingSystem borderColor. aPlug setNameTo: aTitle. aPlug hResizing: #spaceFill. aPlug vResizing: #spaceFill. rightStrip addMorphBack: aPlug. aFlapTab referent ifNotNil: [aFlapTab referent delete]. aFlapTab referent: outer. aFlapTab setName: aTitle edge: anEdge color: (Color r: 0.677 g: 0.935 b: 0.484). aFlapTab submorphs first beAllFont: Preferences standardEToysFont. Project current world addMorphFront: aFlapTab. aFlapTab adaptToWorld: Project current world. aFlapTab computeEdgeFraction. anEdge == #left ifTrue: [aFlapTab position: (outer left @ outer top). outer extent: (540 @ Project current world height)]. anEdge == #right ifTrue: [aFlapTab position: ((Project current world right - aFlapTab width) @ Project current world top). outer extent: (540 @ Project current world height)]. outer beFlap: true. outer color: Color green veryMuchLighter. aPlug textMorph lock. aFlapTab referent hide. aFlapTab openFully. outer beSticky. leftStrip beSticky. rightStrip beSticky. Project current world doOneCycle. aPlug width: 540. aPlug setText: aString. "hmm, again" aPlug color: outer color. aPlug borderWidth: 0. aPlug textMorph contents: aString wrappedTo: 520. aFlapTab applyThickness: 560. aFlapTab fitOnScreen. aFlapTab referent show. ^ aFlapTab!
Item was changed: + ----- Method: StandardScriptingSystem>>paneColor (in category 'tile colors') ----- - ----- Method: StandardScriptingSystem>>paneColor (in category '*Etoys-Squeakland-tile colors') ----- paneColor ^ Color green muchLighter muchLighter!
Item was changed: + ----- Method: StandardScriptingSystem>>patchInNewStandardPlayerForm (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>patchInNewStandardPlayerForm (in category '*Etoys-form dictionary') ----- patchInNewStandardPlayerForm "Patch in a darker and larger representation of a Dot. No senders -- called from the postscript of an update"
"ScriptingSystem patchInNewStandardPlayerForm"
FormDictionary at: #standardPlayer put: (Form extent: 13@13 depth: 16 fromArray: #( 0 0 0 65536 0 0 0 0 0 65537 65537 65536 0 0 0 65537 65537 65537 65537 65536 0 0 65537 65537 65537 65537 65536 0 1 65537 65537 65537 65537 65537 0 1 65537 65537 65537 65537 65537 0 65537 65537 65537 65537 65537 65537 65536 1 65537 65537 65537 65537 65537 0 1 65537 65537 65537 65537 65537 0 0 65537 65537 65537 65537 65536 0 0 65537 65537 65537 65537 65536 0 0 0 65537 65537 65536 0 0 0 0 0 65536 0 0 0) offset: 0@0)!
Item was changed: + ----- Method: StandardScriptingSystem>>privateGraphics (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>privateGraphics (in category '*Etoys-form dictionary') ----- privateGraphics "ScriptingSystem deletePrivateGraphics" ^#(#BadgeMiniPic #BadgePic #Broom #CedarPic #CollagePic #CoverMain #CoverSpiral #CoverTexture #Fred #ImagiPic #KayaPic #StudioPic)!
Item was changed: + ----- Method: StandardScriptingSystem>>prototypicalHolder (in category 'parts bin') ----- - ----- Method: StandardScriptingSystem>>prototypicalHolder (in category '*Etoys-parts bin') ----- prototypicalHolder | aHolder | aHolder := PasteUpMorph authoringPrototype color: Color orange muchLighter; borderColor: Color orange lighter. aHolder setNameTo: 'holder'; extent: 160 @ 110. ^ aHolder behaveLikeHolder. !
Item was changed: + ----- Method: StandardScriptingSystem>>putUpInfoPanelFor:title:extent: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>putUpInfoPanelFor:title:extent: (in category '*Etoys-Squeakland-utilities') ----- putUpInfoPanelFor: aString title: aTitle extent: anExtent "Put up a dismissable help panel showing the given string, with the given extent; the panel will have a slim title bar at top, by which it can be dragged, as well as dismissed."
| aPlug outer |
aPlug := PluggableTextMorph new. aPlug extent: anExtent. aPlug color: Color white. aPlug setText: aString. aPlug hScrollBarPolicy: #never. aPlug vScrollBarPolicy: #whenNeeded. aPlug wrapFlag: true. aPlug borderWidth: 0. aPlug borderColor: ScriptingSystem borderColor. aPlug setNameTo: aTitle.
outer := self buildPanelTitled: aTitle. outer addMorphBack: aPlug. aPlug textMorph lock.
outer openInWorld.
" ScriptingSystem putUpInfoPanelFor: AllScriptsTool new helpString title: 'Testing One Two Three' extent: 800@600. "!
Item was changed: + ----- Method: StandardScriptingSystem>>randomColorTile (in category 'gold box') ----- - ----- Method: StandardScriptingSystem>>randomColorTile (in category '*Etoys-Squeakland-gold box') ----- randomColorTile "Answer a new object comprising the timesRepeat structure."
^ ColorTileRandom new!
Item was changed: + ----- Method: StandardScriptingSystem>>randomNumberTile (in category 'gold box') ----- - ----- Method: StandardScriptingSystem>>randomNumberTile (in category '*Etoys-Squeakland-gold box') ----- randomNumberTile "Answer a new Random Number tile"
| functionPhrase argTile aPad | functionPhrase := FunctionTile new. argTile := (Vocabulary vocabularyNamed: 'Number') defaultArgumentTile. aPad := TilePadMorph new setType: #Number. aPad addMorphBack: argTile. functionPhrase operator: #random pad: aPad. ^ functionPhrase!
Item was changed: + ----- Method: StandardScriptingSystem>>randomTileIconForm (in category 'universal slots & scripts') ----- - ----- Method: StandardScriptingSystem>>randomTileIconForm (in category '*Etoys-Squeakland-utilities') ----- randomTileIconForm "Answer the form to use in the gold box for the random tile item."
^ self formAtKey: #randomTileIconForm!
Item was changed: + ----- Method: StandardScriptingSystem>>readFormsFromFileNamed: (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>readFormsFromFileNamed: (in category '*Etoys-form dictionary') ----- readFormsFromFileNamed: aFileName "Read the entire FormDictionary in from a designated file on disk"
| aReferenceStream | aReferenceStream := ReferenceStream fileNamed: aFileName. FormDictionary := aReferenceStream next. aReferenceStream close
"ScriptingSystem readFormsFromFileNamed: 'EToyForms22Apr'"!
Item was changed: + ----- Method: StandardScriptingSystem>>readFormsFromFileNamed:andStoreIntoGlobal: (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>readFormsFromFileNamed:andStoreIntoGlobal: (in category '*Etoys-form dictionary') ----- readFormsFromFileNamed: aFileName andStoreIntoGlobal: globalName "Read the a FormDictionary in from a designated file on disk and save it in the designated global"
| aReferenceStream | aReferenceStream := ReferenceStream fileNamed: aFileName. Smalltalk at: globalName put: aReferenceStream next. aReferenceStream close
"ScriptingSystem readFormsFromFileNamed: 'SystemFormsFromFwdF.forms' andStoreIntoGlobal: #FormsTemp"
"ScriptingSystem saveForm: (FormsTemp at: #StackElementDesignationHelp) atKey: #StackElementDesignationHelp"!
Item was changed: + ----- Method: StandardScriptingSystem>>reclaimSpace (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>reclaimSpace (in category '*Etoys-utilities') ----- reclaimSpace "Reclaim space from the scripting system, and report the result in an informer" "ScriptingSystem reclaimSpace"
| reclaimed | (reclaimed := self spaceReclaimed) > 0 ifTrue: [self inform: reclaimed printString, ' bytes reclaimed'] ifFalse: [self inform: 'Hmm... Nothing gained this time.']!
Item was changed: + ----- Method: StandardScriptingSystem>>referenceAt: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>referenceAt: (in category '*Etoys-utilities') ----- referenceAt: aSymbol "Answer the object referred to by aSymbol in the 'References' scheme of things, or nil if none"
^ References at: aSymbol ifAbsent: [nil]!
Item was changed: + ----- Method: StandardScriptingSystem>>referenceAt:put: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>referenceAt:put: (in category '*Etoys-utilities') ----- referenceAt: aSymbol put: anObject "Store a reference to anObject at the given symbol in the References directory"
^ References at: aSymbol put: anObject!
Item was changed: + ----- Method: StandardScriptingSystem>>reinvigorateThumbnailsInViewerFlapTabs (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>reinvigorateThumbnailsInViewerFlapTabs (in category '*Etoys-utilities') ----- reinvigorateThumbnailsInViewerFlapTabs "It has happened that the thumbnail in a viewer flap tab will go solid gray because it got associated with some passing and disused player temporarily created during the initial painting process. This method takes a sledge hammer to repair such thumbnails. At its genesis, this method is called only from the postscript of its defining fileout." ViewerFlapTab allInstancesDo: [:aTab | | vwr thumbnail | vwr := aTab referent findA: StandardViewer. thumbnail := aTab findA: ThumbnailMorph. (vwr notNil and: [thumbnail notNil]) ifTrue: [thumbnail objectToView: vwr scriptedPlayer]]
"ScriptingSystem reinvigorateThumbnailsInViewerFlapTabs"!
Item was changed: + ----- Method: StandardScriptingSystem>>removeCustomEventNamed:for: (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>removeCustomEventNamed:for: (in category '*Etoys-customevents-custom events') ----- removeCustomEventNamed: aSymbol for: registrant | registration helpString | registration := self customEventsRegistry at: aSymbol ifAbsent: [ ^nil ]. helpString := registration removeKey: registrant ifAbsent: []. registration isEmpty ifTrue: [ self customEventsRegistry removeKey: aSymbol ]. ^helpString!
Item was changed: + ----- Method: StandardScriptingSystem>>removeFromSoundLibrary: (in category 'sound library') ----- - ----- Method: StandardScriptingSystem>>removeFromSoundLibrary: (in category '*Etoys-Squeakland-sound library') ----- removeFromSoundLibrary: aSoundName "Allow the user to remove a user-added sound from the Sound library."
| found | found := 0. SoundTile allInstances do: [:m | m literal = aSoundName ifTrue: [m literal: 'clink'. found := found + 1]]. SampledSound removeSoundNamed: aSoundName. found > 0 ifTrue: [self inform: found printString, ' tiles reverted to "clink"' translated]!
Item was changed: + ----- Method: StandardScriptingSystem>>removeUserCustomEventNamed: (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>removeUserCustomEventNamed: (in category '*Etoys-customevents-custom events') ----- removeUserCustomEventNamed: eventName | retval | retval := self currentWorld removeUserCustomEventNamed: eventName. "Vocabulary addStandardVocabulary: UserCustomEventNameType new." Vocabulary customEventsVocabulary. SymbolListTile updateAllTilesForVocabularyNamed: #CustomEvents. ^retval!
Item was changed: + ----- Method: StandardScriptingSystem>>renameSound:newName: (in category 'sound library') ----- - ----- Method: StandardScriptingSystem>>renameSound:newName: (in category '*Etoys-Squeakland-sound library') ----- renameSound: aSoundName newName: aNewName "Change the name of a given sound "
| found | found := 0. SampledSound renameSound: aSoundName newName: aNewName. SoundTile allInstances do: [:m | m literal = aSoundName ifTrue: [m literal: aNewName. found := found + 1]]. found > 0 ifTrue: [self inform: found printString, ' tile(s) changed to "' translated, aNewName]!
Item was changed: + ----- Method: StandardScriptingSystem>>reportToUser: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>reportToUser: (in category '*Etoys-utilities') ----- reportToUser: aString "Make a message accessible to the user. "
| trigger current baseTriggerer topTriggerer mclass sel topSelector | trigger := Player compiledMethodAt: #triggerScript:. current := thisContext. baseTriggerer := nil. topTriggerer := nil. [current notNil] whileTrue: [ topTriggerer ifNil: [ current receiver class isUniClass ifTrue: [ "Look for the top-most uniclass script in the call chain." sel := current receiver class selectorAtMethod: current homeMethod setClass: [:c | mclass := c]. mclass = current receiver class ifTrue: [ topTriggerer := current. topSelector := sel. ]. ]. ]. (current method = trigger and: [current isExecutingBlock not]) ifTrue: [ "Look for the bottom-most #triggerScript: and its selector." baseTriggerer := current ]. current := current sender. ]. baseTriggerer ifNotNil: [ (baseTriggerer receiver scriptInstantiationForSelector: (baseTriggerer at: 1)) resetTo: #paused ifCurrently: #ticking. ]. (topTriggerer notNil and: [topSelector notNil]) ifTrue: [ ^ self eToysError: aString, '', topTriggerer receiver knownName, '', topSelector. ]. self error: aString!
Item was changed: + ----- Method: StandardScriptingSystem>>resetAllScriptingReferences (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>resetAllScriptingReferences (in category '*Etoys-utilities') ----- resetAllScriptingReferences "Clear out all the elements in the References directory" Smalltalk at: #References put: IdentityDictionary new
"ScriptingSystem resetAllScriptingReferences"!
Item was changed: + ----- Method: StandardScriptingSystem>>resetStaleScriptingReferences (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>resetStaleScriptingReferences (in category '*Etoys-utilities') ----- resetStaleScriptingReferences "Remove all scripting references that are no longer needed"
References removeUnreferencedKeys
"ScriptingSystem resetStaleScriptingReferences" !
Item was changed: + ----- Method: StandardScriptingSystem>>resetStandardPartsBin (in category 'parts bin') ----- - ----- Method: StandardScriptingSystem>>resetStandardPartsBin (in category '*Etoys-parts bin') ----- resetStandardPartsBin "ScriptingSystem resetStandardPartsBin"
StandardPartsBin := nil!
Item was changed: + ----- Method: StandardScriptingSystem>>restoreClassicEToyLook (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>restoreClassicEToyLook (in category '*Etoys-utilities') ----- restoreClassicEToyLook "Restore classic EToy look, as closely as possible. If ComicBold is present, restore it as the standard etoy and button font. Substitute ComicSansMS and Accuny as respective alternatives if the classic fonts are absent. If those also aren't available, do nothing."
| aTextStyle aFont | (aTextStyle := TextStyle named: #ComicBold) ifNotNil: [aFont := aTextStyle fontOfSize: 16. Preferences setEToysFontTo: aFont. Preferences setButtonFontTo: aFont] ifNil: [(aTextStyle := TextStyle named: #ComicSansMS) ifNotNil: [Preferences setEToysFontTo: (aTextStyle fontOfSize: 18)]. (aTextStyle := TextStyle named: #Accuny) ifNotNil: [Preferences setButtonFontTo: (aTextStyle fontOfSize: 12)]].
(aTextStyle := TextStyle named: #NewYork) ifNotNil: [Preferences setSystemFontTo: (aTextStyle fontOfSize: 12)]!
Item was changed: + ----- Method: StandardScriptingSystem>>restorePrivateGraphics (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>restorePrivateGraphics (in category '*Etoys-form dictionary') ----- restorePrivateGraphics "ScriptingSystem restorePrivateGraphics" | aReferenceStream | aReferenceStream := ReferenceStream fileNamed: 'disGraphics'. self mergeGraphicsFrom: aReferenceStream next. aReferenceStream close. !
Item was changed: + ----- Method: StandardScriptingSystem>>saveForm:atKey: (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>saveForm:atKey: (in category '*Etoys-form dictionary') ----- saveForm: aForm atKey: aKey FormDictionary at: aKey asSymbol put: aForm!
Item was changed: + ----- Method: StandardScriptingSystem>>saveFormsToFileNamed: (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>saveFormsToFileNamed: (in category '*Etoys-form dictionary') ----- saveFormsToFileNamed: aFileName "Save the current state of form dictionary to disk for possible later retrieval" (ReferenceStream fileNamed: aFileName) nextPut: FormDictionary; close
"ScriptingSystem saveFormsToFileNamed: 'SystemForms06May98.forms'"!
Item was changed: + ----- Method: StandardScriptingSystem>>scriptControlButtons (in category 'script-control') ----- - ----- Method: StandardScriptingSystem>>scriptControlButtons (in category '*Etoys-script-control') ----- scriptControlButtons "Answer a composite object that serves to control the stop/stop/go status of a Presenter"
| wrapper | wrapper := AlignmentMorph newRow setNameTo: 'script controls'. wrapper vResizing: #shrinkWrap. wrapper hResizing: #shrinkWrap. wrapper addMorph: self stopButton. wrapper addMorphBack: self stepButton. wrapper addMorphBack: self goButton. wrapper beTransparent. ^ wrapper!
Item was changed: + ----- Method: StandardScriptingSystem>>searchForSlotProtocolConflicts (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>searchForSlotProtocolConflicts (in category '*Etoys-Squeakland-utilities') ----- searchForSlotProtocolConflicts "Search for conflicts in slot protocol declarations. Show details of conflicts found in the Transcript."
| aDict additions itsAdditions slotName existing | aDict := Dictionary new. Morph withAllSubclasses asArray do: [:cl | additions := cl class selectors select: [:sel | ((sel includes: $:) not) and: [sel beginsWith: 'additionsToViewerCategor']]. additions do: [:sel | itsAdditions := sel = #additionsToViewerCategories ifTrue: [cl perform: sel] ifFalse: [Array with: (cl perform: sel)]. itsAdditions do: [:pair | pair second do: [:m | m first == #slot ifTrue: [slotName := m second. existing := aDict at: slotName ifAbsent: [nil]. existing ifNil: [aDict at: slotName put: m] ifNotNil: [((existing fourth ~= m fourth) "type" or: [existing fifth ~= m fifth] "readOnly or readWrite" or: [existing seventh ~= m seventh] "getter" or: [existing ninth ~= m ninth] ) "setter" ifTrue: [Transcript cr; show: existing. Transcript cr; show: m]]]]]]].
" ScriptingSystem searchForSlotProtocolConflicts. "!
Item was changed: + ----- Method: StandardScriptingSystem>>seminalFunctionTile (in category 'gold box') ----- - ----- Method: StandardScriptingSystem>>seminalFunctionTile (in category '*Etoys-Squeakland-gold box') ----- seminalFunctionTile "Answer a prototypical function tile"
| functionPhrase argTile aPad | functionPhrase := FunctionTile new. argTile := (Vocabulary vocabularyNamed: 'Number') defaultArgumentTile. aPad := TilePadMorph new setType: #Number. aPad addMorphBack: argTile. functionPhrase operator: #abs pad: aPad. ^ functionPhrase!
Item was changed: + ----- Method: StandardScriptingSystem>>setterFeedback (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>setterFeedback (in category '*Etoys-Squeakland-font & color choices') ----- setterFeedback
^Color r: 1.0 g: 0.548 b: 0.452!
Item was changed: + ----- Method: StandardScriptingSystem>>setterSelectorForGetter: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>setterSelectorForGetter: (in category '*Etoys-utilities') ----- setterSelectorForGetter: aGetterSymbol "Answer the setter selector corresponding to a given getter"
^ (('s', (aGetterSymbol copyFrom: 2 to: aGetterSymbol size)), ':') asSymbol
"ScriptingSystem setterSelectorForGetter: #getCursor"!
Item was changed: + ----- Method: StandardScriptingSystem>>sizeForThumbnailsInProjectSorter (in category 'olpc') ----- - ----- Method: StandardScriptingSystem>>sizeForThumbnailsInProjectSorter (in category '*Etoys-Squeakland-olpc') ----- sizeForThumbnailsInProjectSorter "Answer the desired size for thumbnails in the Project Sorter."
^ 160 @ 120
"Historically a thumbnail size of 80@60 has been used; here we scale this up by 2x for the benefit of the olpc screen. Eventually we may wish to parameterize and expose this value."!
Item was changed: + ----- Method: StandardScriptingSystem>>smallBoldFont (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>smallBoldFont (in category '*Etoys-font & color choices') ----- smallBoldFont "Answer a small bold font for use in some standard scripting-support structures"
^ StrikeFont familyName: Preferences standardEToysFont familyName size: 12!
Item was changed: + ----- Method: StandardScriptingSystem>>sorterGridSize (in category 'olpc') ----- - ----- Method: StandardScriptingSystem>>sorterGridSize (in category '*Etoys-Squeakland-olpc') ----- sorterGridSize "Answer the grid-size to use in the ProjectSorterMorph and confreres."
^ 32 @ 32
"Historically the grid for sorters has been 16@16, but we jack it up for OLPC, understanding that eventualliy we may want UI whereby this parameter choice is exposed to, and is settable by, the user."!
Item was changed: + ----- Method: StandardScriptingSystem>>soundNamesToSuppress (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>soundNamesToSuppress (in category '*Etoys-utilities') ----- soundNamesToSuppress "Answer a list of sound-names that are not to be offered in sound-choice pop-ups unless they are the current choice"
^ #('scrape' 'scritch' 'peaks')!
Item was changed: + ----- Method: StandardScriptingSystem>>spaceReclaimed (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>spaceReclaimed (in category '*Etoys-utilities') ----- spaceReclaimed "Reclaim space from the EToy system, and return the number of bytes reclaimed" "ScriptingSystem spaceReclaimed"
| oldFree | oldFree := Smalltalk garbageCollect. ThumbnailMorph recursionReset. Player removeUninstantiatedSubclassesSilently. Smalltalk cleanOutUndeclared. Smalltalk reclaimDependents. ^ Smalltalk garbageCollect - oldFree.!
Item was changed: + ----- Method: StandardScriptingSystem>>squeakyMouseForm (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>squeakyMouseForm (in category '*Etoys-form dictionary') ----- squeakyMouseForm ^ self formAtKey: 'squeakyMouse'
" ScriptingSystem saveForm: (Form extent: 30@29 depth: 16 fromArray: #( 1811114995 1878286257 2012637171 1811180532 1811180533 1811179508 1811180532 1811179508 1744006133 1878289396 1811180533 1878289396 1744007156 1674736630 1744006132 1811114995 1811181556 1744006131 1811246068 1811180532 1811179508 1811180532 1744071668 1811113972 1811180532 1811180532 1811179507 1878288338 1945529332 1744071668 1743941620 1811112945 1811179506 1811114995 1744006131 1744006130 1744005106 1811048434 1811113969 1743939570 1811179506 1743939571 1676833782 1676765171 1811047410 1744006131 1811048435 1811116020 1811180531 1743939571 1811048435 1743939570 1743939570 1743939570 1743940594 1744005106 1811181556 1811180532 1676766196 1743939570 1878420468 1676963830 1189896082 1811245044 1744137204 1744070644 1811179508 1811113971 1743939571 1811179508 1811246070 1811309524 1811302093 1811310580 1811246068 1674867703 1744049472 1120606594 1118465013 1744137205 1811179508 1811180532 1744071667 1744006132 1811112947 1811247095 1605584589 358761132 289435638 1676 830707 1741975543 1462778473 1811312631 702891724 1811310548 1945528308 1811178450 1945528307 1878288372 1878353875 1878421494 1051471335 1809213397 1118524175 1811246068 1945659348 1185698607 1878486005 1672694510 1118531574 1607626741 1878420467 1811180533 1743942645 1744072693 1811301035 1185770487 1878486006 1324239597 1811180533 1811116019 1120623438 1878352818 1945462739 704868339 1878289395 1811049459 1878221808 1878223859 1743876083 1811162563 1945463796 1811181556 1464746666 1811116018 1809019893 1120551562 1945464821 1741844468 1466842760 1878289395 1811048434 1811050483 1811050483 1878223859 1049188174 1741910004 1811181556 1256998634 1811114994 1878289396 1466840647 1744007156 1744006131 1676877216 1743940596 1878222835 1743938545 1878351792 1676833781 358641652 1743940596 1811050484 845566798 1811113970 1811114995 1811163652 1811112913 1878420468 1878282028 1811179506 1607560178 1878289395 1676900342 1878351825 1466853330 1811113971 1811116019 635659217 1811179506 18112 45045 1676942754 1744137206 1744201717 1676962806 1676962805 1811310581 1676896245 1744199635 1811376117 1744072695 1744005109 1811244019 499279861 1811310581 1811244020 1811293668 1399943159 1605528567 1744136181 982063522 986342388 1744070645 1744189066 430063308 1744071669 1744070644 1744067504 566519797 1744136181 1744137205 1743999854 912813044 1811311606 1742162607 4195488 283139922 1945531382 1253113857 144710948 1601400791 1811246069 1811167879 1464821747 1744136180 1674799094 1811178482 843473875 1811311606 1878533542 2106790 2080066222 1876193270 696845376 627472380 1185772536 1878355957 1743990309 1744007157 1676898294 1744006132 1811114996 1743941620 1811180533 1809204941 4194368 4217681 1878290421 1252982848 4194336 1670540278 1739811795 1878353906 1744006131 1811179506 1744007157 1744005106 1945462771 1811182582 1811311574 1393641133 1462856629 2012638196 1876382449 1112301394 1742041045 1945596917 1676833781 1811113970 1811179507 1811180532 1672705014 1674735606 16726 97648 1945725943 1878551479 1809215479 1811312629 1809216504 1809215479 1809215478 1462853490 1878487029 1744007158 1744005075 1811239726 704979363 495004132 700789287 562372997 631646663 1739998892 4194400 1116497846 698688932 562375109 770124262 633609569 495070758 1257010166 562315916 1809279958 2012894002 1047280171 980237901 910966381 1668677696 4194400 6314867 1047281260 908804749 910968495 1393719290 1809279959 1185750370 1809214455 1878469062 423836236 1532188466 1601592148 1462986647 1672937568 4194368 6319062 1603622706 1601525554 1601522417 1047336194 770206679 1878487031 1878409899 977955830 1809145716 1118586509 980105834 980045584 1811372914 980104778 1605526483 1395605131 910769804 1118651052 1534358520 1809136234 1118596053 1532059506 1878485973 1326456163 1945660374 1742106615 1811311607 1945725942 1742107641 1744072693 1811311605 1744203767 1878551543 564478604 1878553591 1603428242 1811048433 1811049459 1051290611 1744006131 1811049459 1878156273 1743874034 174400 7156 1743874033 1811048434 1811113970 1743939571 1743933228 1603301363 1743875059 1811049458 1945461745 1811181556 1811113971 1811049458 1811048434 1811116020 1878287346 1878223857 1743940594 1744006130 1744007157 1945395153 1945400309 1811048434 1743810547 1676765170 1878353906 1811113970 1743874032 1810983921 1743874033 1811113971 1676765169 1743874034 1743940593 1743939569 1811047409 1676765168 1743940595 1810981872 1945397235 1607560179 1743941620 1810982897 1810983921 1811048433 1744007155 1743875059 1811048434 1743875058 1743939568 1676832754 1811116019 1811114994 1811244019 1676962805 1677029367 1811244020 1744005106 1743940594 1811246068 1744070645 1676961781 1744004084 1676897269 1811180533 1878353908 1744004083 1744070645) offset: 0@0) atKey: 'squeakyMouse'"!
Item was changed: + ----- Method: StandardScriptingSystem>>standardEventStati (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>standardEventStati (in category '*Etoys-customevents-custom events') ----- standardEventStati "Answer the events that can be directed to a particular morph by its event handler." #('mouseDown' 'mouseStillDown' 'mouseUp' 'mouseEnter' 'mouseLeave' 'mouseEnterDragging' 'mouseLeaveDragging') translatedNoop. ^ #( mouseDown "run when mouse goes down on me" mouseStillDown "while mouse still down" mouseUp "when mouse comes back up" mouseEnter "when mouse enters my bounds, button up" mouseLeave "when mouse exits my bounds, button up" mouseEnterDragging "when mouse enters my bounds, button down" mouseLeaveDragging "when mouse exits my bounds, button down" "keyStroke" "gesture" ) !
Item was changed: + ----- Method: StandardScriptingSystem>>standardForms (in category 'form dictionary') ----- - ----- Method: StandardScriptingSystem>>standardForms (in category '*Etoys-form dictionary') ----- standardForms "ScriptingSystem standardForms" ^ FormDictionary collect: [:f | f]!
Item was changed: + ----- Method: StandardScriptingSystem>>standardTileBorderColor (in category 'tile colors') ----- - ----- Method: StandardScriptingSystem>>standardTileBorderColor (in category '*Etoys-tile colors') ----- standardTileBorderColor "Answer the color to use for tile borders"
^ Color r: 0.804 g: 0.76 b: 0.564!
Item was changed: + ----- Method: StandardScriptingSystem>>statusColorSymbolFor: (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>statusColorSymbolFor: (in category '*Etoys-font & color choices') ----- statusColorSymbolFor: statusSymbol #( (normal green) (ticking blue) (paused red) (mouseDown yellow) (mouseStillDown lightYellow) (mouseUp lightBlue) (mouseEnter lightBrown) (mouseLeave lightRed) (mouseEnterDragging lightGray) (mouseLeaveDragging darkGray) (keyStroke lightGreen)) do:
[:pair | statusSymbol == pair first ifTrue: [^ pair second]].
^ #blue!
Item was changed: + ----- Method: StandardScriptingSystem>>statusHelpStringFor: (in category 'customevents-help dictionary') ----- - ----- Method: StandardScriptingSystem>>statusHelpStringFor: (in category '*Etoys-customevents-help dictionary') ----- statusHelpStringFor: aPlayer ^String streamContents: [ :stream | stream nextPutAll: 'normal -- run when called paused -- ready to run all the time ticking -- run all the time mouseDown -- run when mouse goes down on me mouseStillDown -- while mouse still down mouseUp -- when mouse comes back up mouseEnter -- when mouse enters my bounds, button up mouseLeave -- when mouse exits my bounds, button up mouseEnterDragging -- when mouse enters my bounds, button down mouseLeaveDragging -- when mouse exits my bounds, button down opening -- when I am being opened closing -- when I am being closed' translated.
"'keyStroke -- run when user hits a key' "
stream cr; cr; nextPutAll: 'More events:' translated; cr.
(self customEventNamesAndHelpStringsFor: aPlayer) do: [ :array | stream cr; nextPutAll: array first; nextPutAll: ' -- '. array second do: [ :help | stream nextPutAll: help translated ] separatedBy: [ stream nextPutAll: ' or ' translated ]].
(Preferences valueOfFlag: #allowEtoyUserCustomEvents) ifTrue: [ self userCustomEventNames isEmpty ifFalse: [ stream cr; cr; nextPutAll: 'User custom events:' translated; cr. self currentWorld userCustomEventsRegistry keysAndValuesDo: [ :key :value | stream cr; nextPutAll: key; nextPutAll: ' -- '; nextPutAll: value ]]]]!
Item was changed: + ----- Method: StandardScriptingSystem>>stepButton (in category 'script-control') ----- - ----- Method: StandardScriptingSystem>>stepButton (in category '*Etoys-script-control') ----- stepButton | aButton | self flag: #deferred. "ambiguity about recipients" aButton := ThreePhaseButtonMorph new. aButton offImage: (ScriptingSystem formAtKey: 'StepPic'); pressedImage: (ScriptingSystem formAtKey: 'StepPicOn'); image: (ScriptingSystem formAtKey: 'StepPicOn'); arguments: (Array with: nil with: aButton); actionSelector: #stepStillDown:with:; target: self; setNameTo: 'Step Button'; actWhen: #whilePressed; on: #mouseDown send: #stepDown:with: to: self; on: #mouseStillDown send: #stepStillDown:with: to: self; on: #mouseUp send: #stepUp:with: to: self; setBalloonText: 'Run every paused script exactly once. Keep the mouse button down over "Step" and everything will keep running until you release it' translated. ^ aButton!
Item was changed: + ----- Method: StandardScriptingSystem>>stepDown:with: (in category 'script-control') ----- - ----- Method: StandardScriptingSystem>>stepDown:with: (in category '*Etoys-script-control') ----- stepDown: evt with: aMorph aMorph presenter stopRunningScripts!
Item was changed: + ----- Method: StandardScriptingSystem>>stepStillDown:with: (in category 'script-control') ----- - ----- Method: StandardScriptingSystem>>stepStillDown:with: (in category '*Etoys-script-control') ----- stepStillDown: dummy with: theButton Cursor wait showWhile: [ theButton presenter stepStillDown: dummy with: theButton ]!
Item was changed: + ----- Method: StandardScriptingSystem>>stepUp:with: (in category 'script-control') ----- - ----- Method: StandardScriptingSystem>>stepUp:with: (in category '*Etoys-script-control') ----- stepUp: evt with: aMorph aMorph presenter stepUp: evt with: aMorph!
Item was changed: + ----- Method: StandardScriptingSystem>>stopButton (in category 'script-control') ----- - ----- Method: StandardScriptingSystem>>stopButton (in category '*Etoys-script-control') ----- stopButton "Answer a new button that can serve as a stop button" | aButton | aButton := ThreePhaseButtonMorph new. aButton offImage: (ScriptingSystem formAtKey: 'StopPic'); pressedImage: (ScriptingSystem formAtKey: 'StopPicOn'); image: (ScriptingSystem formAtKey: 'StopPic'). aButton actionSelector: #stopUp:with:; arguments: (Array with: nil with: aButton); actWhen: #buttonUp; target: self; setNameTo: 'Stop Button'; setBalloonText: 'Pause all ticking scripts.' translated. ^ aButton!
Item was changed: + ----- Method: StandardScriptingSystem>>stopUp:with: (in category 'script-control') ----- - ----- Method: StandardScriptingSystem>>stopUp:with: (in category '*Etoys-script-control') ----- stopUp: dummy with: theButton | aPresenter | Cursor wait showWhile: [ (aPresenter := theButton presenter) flushPlayerListCache. "catch guys not in cache but who're running" aPresenter stopRunningScriptsFrom: theButton ]!
Item was changed: + ----- Method: StandardScriptingSystem>>stripGraphicsForExternalRelease (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>stripGraphicsForExternalRelease (in category '*Etoys-utilities') ----- stripGraphicsForExternalRelease "ScriptingSystem stripGraphicsForExternalRelease"
| replacement | replacement := FormDictionary at: #Gets.
#('BadgeMiniPic' 'BadgePic' 'Broom' 'CedarPic' 'CollagePic' 'CoverMain' 'CoverSpiral' 'CoverTexture' 'Fred' 'ImagiPic' 'KayaPic' 'StudioPic') do: [:aKey | FormDictionary at: aKey asSymbol put: replacement]!
Item was changed: + ----- Method: StandardScriptingSystem>>systemQueryPhraseWithActionString:labelled: (in category 'gold box') ----- - ----- Method: StandardScriptingSystem>>systemQueryPhraseWithActionString:labelled: (in category '*Etoys-Squeakland-gold box') ----- systemQueryPhraseWithActionString: aString labelled: anotherString "Answer a system-query-phrase with the give action-string and label."
^ Project current world presenter systemQueryPhraseWithActionString: aString labelled: anotherString!
Item was changed: + ----- Method: StandardScriptingSystem>>systemSlotNamesOfType: (in category 'universal slots & scripts') ----- - ----- Method: StandardScriptingSystem>>systemSlotNamesOfType: (in category '*Etoys-universal slots & scripts') ----- systemSlotNamesOfType: aType "Answer the type of the slot name, or nil if not found." | aList | self flag: #deferred. "Hard-coded etoyVocabulary needed here to make this work." aList := OrderedCollection new. Vocabulary eToyVocabulary methodInterfacesDo: [:anInterface | anInterface resultType = aType ifTrue: [aList add: anInterface selector]]. ^ aList!
Item was changed: + ----- Method: StandardScriptingSystem>>tableOfNumericFunctions (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>tableOfNumericFunctions (in category '*Etoys-Squeakland-utilities') ----- tableOfNumericFunctions "Answer an array of <external function name> <actual function to call> <help string> triplets."
" English on tile selector English balloon help" ^ #( ('abs' abs 'absolute value') ('arcTan' arcTan 'angle, in radians, whose tangent is the argument') ('cos' cos 'trigonometric cosine, argument in radians') ('cube' cubed 'the argument times itself, times itself again') ('cubeRoot ' cubeRoot 'cube root of the argument') ('degreeArcTan' degreeArcTan 'angle, in degrees, whose tangent is the argument') ('degreeCos' degreeCos 'trigonometric cosine, argument in degrees') ('degreeSin' degreeSin 'trigonometric sine, argument in degrees') ('degreeTan' degreeTan 'trigonometric tangent, argument in degrees')
('degreesToRadians' degreesToRadians 'the number of degrees equivalent to the argument which is assumed to be expressed in radians') ('exp' exp 'exponential (e to the power of the argument)') ('factorial' safeFactorial 'the product of all the whole numbers between 1 and the argument') ('ln' safeLn 'natural logarithm') ('log' safeLog 'logarithm, base 10') ('negate' negated 'the negative of the argument') ('radiansToDegrees' radiansToDegrees 'the number of radians equivalent to the argument, which is expressed in degrees.') ('random' random 'a randomly chosen integer between 1 and the argument') ('round' rounded 'the integer closest to the argument.') ('sign' sign '1 if argument is positive, -1 if argument is negative, 0 if argument is zero.') ('sin' sin 'trigonometric sine, argument in radians') ('square' squared 'the argument multiplied by itself') ('squareRoot' safeSquareRoot 'square root of the argument') ('tan' tan 'trigonometric tangent, argument in radians') ('truncate' truncated 'the integer nearest to the argument toward zero')
) translatedNoop
" (raisedto raisedTo: 'raised to the power') "!
Item was changed: + ----- Method: StandardScriptingSystem>>tileForArgType: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>tileForArgType: (in category '*Etoys-utilities') ----- tileForArgType: aType "Anwer a default tile to represent a datum of the given argument type, which may be either a symbol (e.g. #Color) or a class"
(aType isKindOf: Class) "Allowed in Ted's work" ifTrue: [^ aType name asString newTileMorphRepresentative typeColor: Color gray].
^ (Vocabulary vocabularyForType: aType) defaultArgumentTile!
Item was changed: + ----- Method: StandardScriptingSystem>>tileForArgType:forCommand: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>tileForArgType:forCommand: (in category '*Etoys-Squeakland-utilities') ----- tileForArgType: aType forCommand: cmd "Anwer a default tile to represent a datum of the given argument type, which may be either a symbol (e.g. #Color) or a class"
(aType isKindOf: Class) "Allowed in Ted's work" ifTrue: [^ aType name asString newTileMorphRepresentative typeColor: Color gray].
cmd = #playSound: ifTrue: [ ^ (Vocabulary vocabularyForType: aType) argumentTileForValue: 880. ]. ^ (Vocabulary vocabularyForType: aType) defaultArgumentTile. !
Item was changed: + ----- Method: StandardScriptingSystem>>tilesForQuery:label: (in category 'parts bin') ----- - ----- Method: StandardScriptingSystem>>tilesForQuery:label: (in category '*Etoys-parts bin') ----- tilesForQuery: expressionString label: aLabel "Answer scripting tiles that represent the query,"
| aPhrase aTile | aPhrase := SystemQueryPhrase new. aTile := BooleanTile new. aTile setExpression: expressionString label: aLabel. aPhrase addMorph: aTile. ^ aPhrase !
Item was changed: + ----- Method: StandardScriptingSystem>>timesRepeatComplexOfTiles (in category 'gold box') ----- - ----- Method: StandardScriptingSystem>>timesRepeatComplexOfTiles (in category '*Etoys-Squeakland-gold box') ----- timesRepeatComplexOfTiles "Answer a new object comprising the timesRepeat structure."
^ TimesRepeatTile new!
Item was changed: + ----- Method: StandardScriptingSystem>>tryButtonFor: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>tryButtonFor: (in category '*Etoys-utilities') ----- tryButtonFor: aPhraseTileMorph | aButton | aButton := ThreePhaseButtonMorph labelSymbol: #TryIt target: aPhraseTileMorph actionSelector: #try arguments: #(). aButton actWhen: #whilePressed. aButton balloonTextSelector: #try. ^ aButton!
Item was changed: + ----- Method: StandardScriptingSystem>>uniformTileInteriorColor (in category 'font & color choices') ----- - ----- Method: StandardScriptingSystem>>uniformTileInteriorColor (in category '*Etoys-font & color choices') ----- uniformTileInteriorColor ^ Color r: 0.806 g: 1.0 b: 0.806!
Item was changed: + ----- Method: StandardScriptingSystem>>uniqueNameForReference (in category 'viewer') ----- - ----- Method: StandardScriptingSystem>>uniqueNameForReference (in category '*Etoys-viewer') ----- uniqueNameForReference "Answer a more-or-less global name by which the receiver can be referred to in scripts"
^ #ScriptingSystem!
Item was changed: + ----- Method: StandardScriptingSystem>>userCustomEventNames (in category 'customevents-custom events') ----- - ----- Method: StandardScriptingSystem>>userCustomEventNames (in category '*Etoys-customevents-custom events') ----- userCustomEventNames ^ self currentWorld userCustomEventNames!
Item was changed: + ----- Method: StandardScriptingSystem>>wordingForOperator: (in category 'utilities') ----- - ----- Method: StandardScriptingSystem>>wordingForOperator: (in category '*Etoys-utilities') ----- wordingForOperator: aString "Answer the wording to be seen by the user for the given operator symbol/string"
| toTest | toTest := aString asString. #( (append: 'include at end') (arrowheadsOnAllPens 'arrowheads on all pens') (beep: 'make sound') (bounce: 'bounce') (clearTurtleTrails 'clear pen trails') (clearOwnersPenTrails 'clear all pen trails') (colorSees 'color sees') (color:sees: 'color sees') (doMenuItem: 'do menu item') (doScript: 'do') (forward: 'forward by') (goToRightOf: 'align after') (includeAtCursor: 'include at cursor') (isDivisibleBy: 'is divisible by') (liftAllPens 'lift all pens') (lowerAllPens 'lower all pens') (makeNewDrawingIn: 'start painting in') (max: 'max') (min: 'min') (moveToward: 'move toward') (noArrowheadsOnAllPens 'no arrowheads on pens') (overlapsAny 'overlaps any') (pauseAll: 'pause all') (pauseScript: 'pause script') (prepend: 'include at beginning') (seesColor: 'is over color') (startAll: 'start all') (startScript: 'start script') (stopProgramatically 'stop') (stopAll: 'stop all') (stopScript: 'stop script') (tellAllSiblings: 'tell all siblings') (tellSelfAndAllSiblings: 'send to all') (turn: 'turn by') (turnToward: 'turn toward') (wearCostumeOf: 'look like'))
do: [:pair | toTest = pair first ifTrue: [^ pair second]].
^ toTest
"StandardScriptingSystem initialize"
!
Item was changed: + ----- Method: StandardScriptingSystem>>yesNoComplexOfTiles (in category 'gold box') ----- - ----- Method: StandardScriptingSystem>>yesNoComplexOfTiles (in category '*Etoys-Squeakland-gold box') ----- yesNoComplexOfTiles "Answer a new object comprising the test/yes/no structure."
^ CompoundTileMorph new!
Item was changed: + ----- Method: TextFieldMorph>>append: (in category 'just like textMorph') ----- - ----- Method: TextFieldMorph>>append: (in category '*Etoys-just like textMorph') ----- append: stringOrText "add to my text" | tm |
(tm := self findA: TextMorph) ifNil: [^ nil]. tm contents append: stringOrText. tm releaseParagraph; paragraph.
!
Item was changed: + ----- Method: TextFieldMorph>>contents (in category 'just like textMorph') ----- - ----- Method: TextFieldMorph>>contents (in category '*Etoys-just like textMorph') ----- contents | tm | "talk to my text"
(tm := self findA: TextMorph) ifNil: [^ nil]. ^ tm contents!
Item was changed: + ----- Method: TextFieldMorph>>contents: (in category 'just like textMorph') ----- - ----- Method: TextFieldMorph>>contents: (in category '*Etoys-just like textMorph') ----- contents: textOrString "talk to my text" | tm newText atts |
(tm := self findA: TextMorph) ifNil: [^ nil]. textOrString isString ifTrue: [ tm contents ifNotNil: ["Keep previous properties of the field" newText := textOrString asText. atts := tm contents attributesAt: 1. atts do: [:each | newText addAttribute: each]. ^ tm contents: newText]].
^ tm contents: textOrString!
Item was changed: + ----- Method: TextFieldMorph>>couldHoldSeparateDataForEachInstance (in category 'card in a stack') ----- - ----- Method: TextFieldMorph>>couldHoldSeparateDataForEachInstance (in category '*Etoys-card in a stack') ----- couldHoldSeparateDataForEachInstance "Answer whether this type of morph is inherently capable of holding separate data for each instance ('card data')"
^ true!
Item was changed: + ----- Method: TextFieldMorph>>currentDataValue (in category 'player') ----- - ----- Method: TextFieldMorph>>currentDataValue (in category '*Etoys-player') ----- currentDataValue "Answer the current data value held by the receiver"
^ self contents!
Item was changed: + ----- Method: TextFieldMorph>>defaultColor (in category 'initialization') ----- - ----- Method: TextFieldMorph>>defaultColor (in category '*Etoys-initialization') ----- defaultColor "answer the default color/fill style for the receiver" ^ Color veryLightGray lighter!
Item was changed: + ----- Method: TextFieldMorph>>fit (in category 'just like textMorph') ----- - ----- Method: TextFieldMorph>>fit (in category '*Etoys-just like textMorph') ----- fit "tell my text to recompute its looks" | tm |
(tm := self findA: TextMorph) ifNil: [^ nil]. tm releaseParagraph; paragraph.!
Item was changed: + ----- Method: TextFieldMorph>>fontName:size: (in category 'just like textMorph') ----- - ----- Method: TextFieldMorph>>fontName:size: (in category '*Etoys-just like textMorph') ----- fontName: fontName size: fontSize | tm | "talk to my text"
(tm := self findA: TextMorph) ifNil: [^ nil]. ^ tm fontName: fontName size: fontSize !
Item was changed: + ----- Method: TextFieldMorph>>initialize (in category 'initialization') ----- - ----- Method: TextFieldMorph>>initialize (in category '*Etoys-initialization') ----- initialize "initialize the state of the receiver" | tm | super initialize. "" self addMorph: (tm := TextMorph new). tm fillingOnOff!
Item was changed: + ----- Method: TextFieldMorph>>lineCount (in category 'just like textMorph') ----- - ----- Method: TextFieldMorph>>lineCount (in category '*Etoys-just like textMorph') ----- lineCount | tm | "how many lines in my text"
(tm := self findA: TextMorph) ifNil: [^ nil]. ^ tm contents string lineCount!
Item was changed: + ----- Method: TextFieldMorph>>prepend: (in category 'just like textMorph') ----- - ----- Method: TextFieldMorph>>prepend: (in category '*Etoys-just like textMorph') ----- prepend: stringOrText "add to my text" | tm |
(tm := self findA: TextMorph) ifNil: [^ nil]. tm contents prepend: stringOrText. tm releaseParagraph; paragraph.
!
Item was changed: + ----- Method: TextFieldMorph>>setNewContentsFrom: (in category 'card in a stack') ----- - ----- Method: TextFieldMorph>>setNewContentsFrom: (in category '*Etoys-card in a stack') ----- setNewContentsFrom: textOrString "talk to my text" | tm |
(tm := self findA: TextMorph) ifNil: [^ nil]. tm valueOfProperty: #cardInstance ifAbsent: ["move it down" tm setProperty: #cardInstance toValue: (self valueOfProperty: #cardInstance)]. tm valueOfProperty: #holdsSeparateDataForEachInstance ifAbsent: ["move it down" tm setProperty: #holdsSeparateDataForEachInstance toValue: (self valueOfProperty: #holdsSeparateDataForEachInstance)]. ^ tm setNewContentsFrom: textOrString!
Item was changed: + ----- Method: TextFieldMorph>>variableDocks (in category 'player') ----- - ----- Method: TextFieldMorph>>variableDocks (in category '*Etoys-player') ----- variableDocks "Answer a list of VariableDock objects for docking up my data with an instance held in my containing playfield"
^ Array with: (VariableDock new variableName: self defaultVariableName type: #text definingMorph: self morphGetSelector: #contents morphPutSelector: #setNewContentsFrom:)!
Item was changed: + ----- Method: ViewerFlapTab>>addCustomMenuItems:hand: (in category 'menu') ----- - ----- Method: ViewerFlapTab>>addCustomMenuItems:hand: (in category '*Etoys-menu') ----- addCustomMenuItems: aMenu hand: aHandMorph "Add further items to the menu as appropriate. NB: Cannot call super here."
aMenu add: 'flap color...' translated target: self action: #changeFlapColor. aMenu addLine. aMenu addUpdating: #edgeString action: #setEdgeToAdhereTo. aMenu addUpdating: #dragoverString action: #toggleDragOverBehavior. aMenu addUpdating: #mouseoverString action: #toggleMouseOverBehavior. aMenu addLine. aMenu addUpdating: #compactFlapString target: self action: #changeCompactFlap.
aMenu add: 'destroy this flap' translated action: #destroyFlap!
Item was changed: + ----- Method: ViewerFlapTab>>adjustPositionAfterHidingFlap (in category 'show & hide') ----- - ----- Method: ViewerFlapTab>>adjustPositionAfterHidingFlap (in category '*Etoys-show & hide') ----- adjustPositionAfterHidingFlap "we add the width of flap itself to our referent, to reflect the actual width from the edge of the screen, including the space we leave for other flaps. see also ViewerFlapTab>>fitOnScreen" self flag: #todo. self referent width: self referent width + self width. super adjustPositionAfterHidingFlap.!
Item was changed: + ----- Method: ViewerFlapTab>>allNonSubmorphMorphs (in category 'submorphs - accessing') ----- - ----- Method: ViewerFlapTab>>allNonSubmorphMorphs (in category '*Etoys-submorphs - accessing') ----- allNonSubmorphMorphs "Return a collection containing all morphs in this morph which are not currently in the submorph containment hierarchy. Especially the non-showing pages in BookMorphs."
^ flapShowing ifTrue: [#()] ifFalse: [Array with: referent]!
Item was changed: + ----- Method: ViewerFlapTab>>beingOpened (in category 'accessing') ----- - ----- Method: ViewerFlapTab>>beingOpened (in category '*Etoys-Squeakland-accessing') ----- beingOpened
self valueOfProperty: #beingOpened ifAbsent: [false] !
Item was changed: + ----- Method: ViewerFlapTab>>beingOpened: (in category 'accessing') ----- - ----- Method: ViewerFlapTab>>beingOpened: (in category '*Etoys-Squeakland-accessing') ----- beingOpened: aBoolean
self setProperty: #beingOpened toValue: aBoolean. !
Item was changed: + ----- Method: ViewerFlapTab>>changeCompactFlap (in category 'compact') ----- - ----- Method: ViewerFlapTab>>changeCompactFlap (in category '*Etoys-compact') ----- changeCompactFlap self makeFlapCompact: self isFlapCompact not.!
Item was changed: + ----- Method: ViewerFlapTab>>compactFlapString (in category 'compact') ----- - ----- Method: ViewerFlapTab>>compactFlapString (in category '*Etoys-compact') ----- compactFlapString ^ (self isFlapCompact ifTrue: ['<on>compact flap'] ifFalse: ['<off>']), 'compact flap' translated!
Item was changed: + ----- Method: ViewerFlapTab>>fitOnScreen (in category 'positioning') ----- - ----- Method: ViewerFlapTab>>fitOnScreen (in category '*Etoys-positioning') ----- fitOnScreen | constrainer | super fitOnScreen. "We want to leave a margin for the flaps on the side and for the global flaps at the top (like the Sugar navbar) so we reduce the referents top and its width. We undo this before hiding the flap in ViewerFlapTab>>adjustPositionAfterHidingFlap" self flag: #todo. constrainer := (owner ifNil: [self]) clearArea. self flapShowing ifTrue: [ Flaps globalFlapTabsIfAny do: [:each | (each edgeToAdhereTo = #top and: [each bottom > self referent top]) ifTrue: [self referent top: each bottom]. (each edgeToAdhereTo = #top and: [each bottom > self top]) ifTrue: [self top: each bottom]]. self referent width: constrainer right - self width - self right].!
Item was changed: + ----- Method: ViewerFlapTab>>graphicalMorphForTab (in category 'menu') ----- - ----- Method: ViewerFlapTab>>graphicalMorphForTab (in category '*Etoys-menu') ----- graphicalMorphForTab "Answer a graphical morph to serve as my tab's display"
^ ThumbnailMorph new objectToView: scriptedPlayer viewSelector: #graphicForViewerTab!
Item was changed: + ----- Method: ViewerFlapTab>>hibernate (in category 'transition') ----- - ----- Method: ViewerFlapTab>>hibernate (in category '*Etoys-transition') ----- hibernate "drop my viewer to save space when writing to the disk."
referent submorphs do: [:m | (m isViewer) ifTrue: [m delete]]!
Item was changed: + ----- Method: ViewerFlapTab>>initializeFor:topAt: (in category 'transition') ----- - ----- Method: ViewerFlapTab>>initializeFor:topAt: (in category '*Etoys-transition') ----- initializeFor: aPlayer topAt: aTop
scriptedPlayer := aPlayer. self useGraphicalTab. self top: aTop!
Item was changed: + ----- Method: ViewerFlapTab>>isCurrentlyGraphical (in category 'accessing') ----- - ----- Method: ViewerFlapTab>>isCurrentlyGraphical (in category '*Etoys-accessing') ----- isCurrentlyGraphical ^ true!
Item was changed: + ----- Method: ViewerFlapTab>>isFlapCompact (in category 'compact') ----- - ----- Method: ViewerFlapTab>>isFlapCompact (in category '*Etoys-compact') ----- isFlapCompact "Return true if the referent of the receiver represents a 'compact' flap" referent layoutPolicy ifNil:[^false]. referent layoutPolicy isTableLayout ifFalse:[^false]. referent vResizing == #shrinkWrap ifFalse:[^false]. ^true!
Item was changed: + ----- Method: ViewerFlapTab>>lazyUnhibernate (in category 'transition') ----- - ----- Method: ViewerFlapTab>>lazyUnhibernate (in category '*Etoys-Squeakland-transition') ----- lazyUnhibernate "recreate my viewer"
| wasShowing viewer | referent ifNotNil: [(referent findA: Viewer) ifNotNil: [self beingOpened: false. ^self]]. self beingOpened == true ifTrue: [^ self]. self beingOpened: true. wasShowing := flapShowing. "guard against not-quite-player-players" viewer := ((scriptedPlayer respondsTo: #costume) and: [scriptedPlayer costume isMorph]) ifTrue: [self presenter viewMorph: scriptedPlayer costume] ifFalse: [self presenter viewObjectDirectly: scriptedPlayer]. wasShowing ifFalse: [self hideFlap]. self beingOpened: false. ^viewer!
Item was changed: + ----- Method: ViewerFlapTab>>makeFlapCompact: (in category 'compact') ----- - ----- Method: ViewerFlapTab>>makeFlapCompact: (in category '*Etoys-compact') ----- makeFlapCompact: aBool "Return true if the referent of the receiver represents a 'compact' flap" aBool ifTrue:[ referent layoutPolicy: TableLayout new; vResizing: #shrinkWrap; useRoundedCorners. ] ifFalse:[ referent layoutPolicy: nil; vResizing: #rigid; useSquareCorners. ].!
Item was changed: + ----- Method: ViewerFlapTab>>scriptedPlayer (in category 'access') ----- - ----- Method: ViewerFlapTab>>scriptedPlayer (in category '*Etoys-access') ----- scriptedPlayer ^ scriptedPlayer!
Item was changed: + ----- Method: ViewerFlapTab>>unhibernate (in category 'transition') ----- - ----- Method: ViewerFlapTab>>unhibernate (in category '*Etoys-transition') ----- unhibernate "recreate my viewer"
| wasShowing viewer | referent ifNotNil: [referent isViewer ifTrue: [^self]]. wasShowing := flapShowing. "guard against not-quite-player-players" viewer := ((scriptedPlayer respondsTo: #costume) and: [scriptedPlayer costume isMorph]) ifTrue: [self presenter viewMorph: scriptedPlayer costume] ifFalse: [self presenter viewObjectDirectly: scriptedPlayer]. wasShowing ifFalse: [self hideFlap]. ^viewer!
packages@lists.squeakfoundation.org