'From Squeak3.2alpha of 3 October 2001 [latest update: #4461] on 29 October 2001 at 5:58:47 pm'! "Change Set: cleanups-sw Date: 29 October 2001 Author: Scott Wallace 1. Adopts more explicit and stern wording in the class-removal confirmation as per recent discussions on squeak list. 2. Uses the better menu icon in the GraphicalDictionaryMenu. 3. Fixes bug that when a new change-set was launched in a dual change-sorter, the change-set-list on the opposite side of the sorter was not updated. 4. Removes a disused inst var from CodeHolder. 5. Removes ten disused methods, primarily from class Presenter. 6. Circumvents error condition formerly seen when user tries to change scaleFactor of a PolygonMorph by manipulating it in a Viewer or changing it programatically. 7. Fixes a bug that could occasionally lead to quite a performance price in the refreshing of annotations of ChangeLists. 8. Makes the repaint-background halo handle available on world halos. 9. Corrects a conflict between the inst var #labelString in Debugger and the same identifier used as a formal-parameter name of a Debugger method, by renaming the formal parameter. This condition had crept in with the summer 2001 betterDebugger update."! !Debugger methodsFor: 'initialize' stamp: 'sw 10/29/2001 20:01'! openFullMorphicLabel: aLabelString "Open a full morphic debugger with the given label" | window aListMorph oldContextStackIndex | oldContextStackIndex _ contextStackIndex. self expandStack. "Sets contextStackIndex to zero." window _ (SystemWindow labelled: aLabelString) model: self. aListMorph _ PluggableListMorph on: self list: #contextStackList selected: #contextStackIndex changeSelected: #toggleContextStackIndex: menu: #contextStackMenu:shifted: keystroke: #contextStackKey:from:. aListMorph menuTitleSelector: #messageListSelectorTitle. window addMorph: aListMorph frame: (0@0 corner: 1@0.3). self addLowerPanesTo: window at: (0@0.3 corner: 1@0.7) with: nil. window addMorph: ( PluggableListMorph new doubleClickSelector: #inspectSelection; on: self receiverInspector list: #fieldList selected: #selectionIndex changeSelected: #toggleIndex: menu: #fieldListMenu: keystroke: #inspectorKey:from:) frame: (0@0.7 corner: 0.2@1). window addMorph: (PluggableTextMorph on: self receiverInspector text: #contents accept: #accept: readSelection: #contentsSelection menu: #codePaneMenu:shifted:) frame: (0.2@0.7 corner: 0.5@1). window addMorph: ( PluggableListMorph new doubleClickSelector: #inspectSelection; on: self contextVariablesInspector list: #fieldList selected: #selectionIndex changeSelected: #toggleIndex: menu: #fieldListMenu: keystroke: #inspectorKey:from:) frame: (0.5@0.7 corner: 0.7@1). window addMorph: (PluggableTextMorph on: self contextVariablesInspector text: #contents accept: #accept: readSelection: #contentsSelection menu: #codePaneMenu:shifted:) frame: (0.7@0.7 corner: 1@1). window openInWorld. self toggleContextStackIndex: oldContextStackIndex. ^ window ! ! StringHolder subclass: #CodeHolder instanceVariableNames: 'currentCompiledMethod contentsSymbol ' classVariableNames: '' poolDictionaries: '' category: 'Kernel-ST80 Remnants'! !CodeHolder methodsFor: 'commands' stamp: 'sw 10/17/2001 21:03'! removeClass "Remove the selected class from the system, at interactive user request. Make certain the user really wants to do this, since it is not reversible. Answer true if removal actually happened." | message className classToRemove result | self okToChange ifFalse: [^ false]. classToRemove _ self selectedClassOrMetaClass ifNil: [^ self beep]. classToRemove _ classToRemove theNonMetaClass. className _ classToRemove name. message _ 'Are you certain that you want to REMOVE the class ', className, ' from the system?'. (result _ self confirm: message) ifTrue: [classToRemove subclasses size > 0 ifTrue: [(self confirm: 'class has subclasses: ' , message) ifFalse: [^ false]]. classToRemove removeFromSystem. self changed: #classList. true]. ^ result ! ! !CodeHolder methodsFor: 'misc' stamp: 'sw 10/28/2001 00:15'! refreshAnnotation "If the receiver has an annotation pane that does not bear unaccepted edits, refresh it" (self dependents detect: [:m | (m inheritsFromAnyIn: #('PluggableTextView' 'PluggableTextMorph')) and: [m getTextSelector == #annotation]] ifNone: [nil]) ifNotNilDo: [:aPane | aPane hasUnacceptedEdits ifFalse: [aPane update: #annotation]]! ! !ChangeSorter methodsFor: 'changeSet menu' stamp: 'sw 10/5/2001 08:52'! newCurrent "make my change set be the current one that changes go into" Smalltalk newChanges: myChangeSet. self update. "Because list of changes in a category may thus have changed" self changed: #relabel.! ! !GraphicalDictionaryMenu methodsFor: 'initialization' stamp: 'sw 10/29/2001 06:30'! initializeFor: aTarget fromDictionary: aDictionary "Initialize me for a target and a dictionary." | imageWrapper anIndex aButton controlsWrapper asm | self listDirection: #topToBottom. self addMorphBack: (controlsWrapper _ AlignmentMorph newRow). self baseDictionary: aDictionary. target _ aTarget. coexistWithOriginal _ true. color _ Color white. borderColor _ Color blue darker. borderWidth _ 1. self hResizing: #shrinkWrap; vResizing: #shrinkWrap. controlsWrapper borderWidth: 0; layoutInset: 0; hResizing: #shrinkWrap; vResizing: #shrinkWrap; extent: 5@5. controlsWrapper wrapCentering: #topLeft; color: Color white; vResizing: #spaceFill. controlsWrapper addTransparentSpacerOfSize: (18@0). controlsWrapper addMorphBack: (IconicButton new borderWidth: 0; labelGraphic: (ScriptingSystem formAtKey: 'TinyMenu'); color: Color transparent; actWhen: #buttonDown; actionSelector: #showMenu; target: self; setBalloonText: 'menu'). controlsWrapper addTransparentSpacerOfSize: (14@0). aButton _ SimpleButtonMorph new target: self; borderColor: Color black. controlsWrapper addMorphBack: (aButton label: 'Prev'; actionSelector: #downArrowHit; actWhen: #whilePressed; setBalloonText: 'show previous picture'; yourself). controlsWrapper addTransparentSpacerOfSize: (15@0). aButton _ SimpleButtonMorph new target: self; borderColor: Color black. controlsWrapper addMorphBack: (aButton label: 'Next'; actionSelector: #upArrowHit; actWhen: #whilePressed; setBalloonText: 'show next pictutre'). self addMorphBack: controlsWrapper. self addTransparentSpacerOfSize: (0 @ 12). self addMorphBack: (asm _ UpdatingStringMorph new contents: ' '; target: self; putSelector: #renameGraphicTo:; getSelector: #truncatedNameOfGraphic; useStringFormat). asm setBalloonText: 'The name of the current graphic'. self addTransparentSpacerOfSize: (0 @ 12). self addMorphBack: (AlignmentMorph newRow height: 4; borderWidth: 0; color: Color black). imageWrapper _ Morph new color: Color transparent; extent: 190 @ 82. imageWrapper addMorphBack: (formDisplayMorph _ ImageMorph new extent: 100 @ 100). self addMorphBack: imageWrapper. target ifNotNil: [(anIndex _ formChoices indexOf: target form ifAbsent: [nil]) ifNotNil: [currentIndex _ anIndex]]. self updateThumbnail! ! !Player methodsFor: 'slot getters/setters' stamp: 'sw 10/28/2001 01:02'! setScaleFactor: aNumber "Set the scale factor to be the given value" | aCostume | aCostume _ self costume. 1.0 = aNumber ifTrue: [0.0 = self getHeading ifTrue: [aCostume isFlexMorph ifTrue: [aCostume removeFlexShell]. ^ self]] ifFalse: [aCostume isFlexMorph ifFalse: [aCostume addFlexShell]]. costume isFlexMorph ifTrue: [costume scale: (aNumber asFloat max: 0.125)]! ! !Preferences class methodsFor: 'halos' stamp: 'sw 10/18/2001 15:09'! haloSpecificationsForWorld | desired | "Answer a list of HaloSpecs that describe which halos are to be used on a world halo, what they should look like, and where they should be situated" "Preferences resetHaloSpecifications" desired _ #(addDebugHandle: addMenuHandle: addTileHandle: addViewHandle: addHelpHandle: addScriptHandle: addPaintBgdHandle:). ^ self haloSpecifications select: [:spec | desired includes: spec addHandleSelector]! ! ScriptInstantiation removeSelector: #copyWithPlayerObliterated! Presenter removeSelector: #dragAndDropToMakeNewDrawing! Presenter removeSelector: #listPaddedWithSpacersFrom:padExtent:! Presenter removeSelector: #newPageForStandardPartsBin! Presenter removeSelector: #pageOfSampleWindowsOfExtent:! Presenter removeSelector: #repairPlayerList! Presenter removeSelector: #returnToFrontPage! Presenter removeSelector: #standardPaletteIsAlready:! Presenter removeSelector: #standardPlayer:! Presenter removeSelector: #tilesPagesForPartsBin! ActorState removeSelector: #copyWithPlayerReferenceNilled!