A new version of ST80 was added to project The Inbox:
http://source.squeak.org/inbox/ST80-ct.242.mcz
==================== Summary ====================
Name: ST80-ct.242
Author: ct
Time: 1 October 2019, 3:54:57.521339 pm
UUID: 69ac6bdc-58c4-fa43-b951-075d9d7f6a79
Ancestors: ST80-mt.241
Complements System-ct.1105
=============== Diff against ST80-mt.241 ===============
Item was changed:
----- Method: ProjectController>>redButtonActivity (in category 'control activity') -----
redButtonActivity
| index |
view isCollapsed ifTrue: [^ super redButtonActivity].
(view insetDisplayBox containsPoint: Sensor cursorPoint)
ifFalse: [^ super redButtonActivity].
index := (UIManager default chooseFrom: #('enter' 'jump to project...') lines: #()).
index = 0 ifTrue: [^ self].
"save size on enter for thumbnail on exit"
+ model viewSize: view insetDisplayBox extent.
- model setViewSize: view insetDisplayBox extent.
index = 1 ifTrue: [^ model enter: false revert: false saveForRevert: false].
index = 2 ifTrue: [Project current jumpToProject. ^ self].
!
A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ct.1104.mcz
==================== Summary ====================
Name: System-ct.1104
Author: ct
Time: 1 October 2019, 3:48:38.186339 pm
UUID: 4ce05ab9-d8fc-3d47-ab32-65fd3b2c2236
Ancestors: System-mt.1102
Adds utility to remove all empty change sets.
=============== Diff against System-mt.1102 ===============
Item was added:
+ ----- Method: ChangeSet class>>removeEmptyChangeSets (in category 'enumerating') -----
+ removeEmptyChangeSets
+ "Remove all change sets that are empty
+ and which are not nailed down by belonging to a Project."
+ "ChangeSet removeEmptyChangeSets"
+ | toGo |
+ toGo := self allChangeSets
+ select: [:cs | cs isEmpty and: [cs okayToRemoveInforming: false]]
+ thenDo: [:cs | self removeChangeSet: cs].
+ self inform: toGo size printString, ' change set(s) removed.'!
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1539.mcz
==================== Summary ====================
Name: Morphic-ct.1539
Author: ct
Time: 1 October 2019, 2:30:30.532339 pm
UUID: 18bcdacc-91ad-9f40-87b4-1a1b0996373b
Ancestors: Morphic-ct.1534
Add even more convenient constructor for NewColorPickerMorph
(NewColorPickerMorph on: Morph new openInWorld colorSelector: #color) openInHand
=============== Diff against Morphic-ct.1534 ===============
Item was added:
+ ----- Method: NewColorPickerMorph class>>on:colorSelector: (in category 'create') -----
+ on: objectToHaveItsColorSet colorSelector: colorSymbol
+ ^ self
+ on: objectToHaveItsColorSet
+ getColorSelector: colorSymbol
+ setColorSelector: colorSymbol asMutator!
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1553.mcz
==================== Summary ====================
Name: Morphic-ct.1553
Author: ct
Time: 1 October 2019, 2:21:48.702339 pm
UUID: da26f6fe-1189-0d4c-ac2c-82200146a448
Ancestors: Morphic-ul.1552
Another approach for remembering Morphic provenance
Use #rememberProvenanceDuring: for temporary provenance logging. Browse logged creator method using the debug menu. Does not affect performance if logging is disabled.
Depends on Tools-ct.893.
=============== Diff against Morphic-ul.1552 ===============
Item was changed:
Object subclass: #Morph
+ instanceVariableNames: 'bounds owner submorphs fullBounds color extension creatorMethod'
+ classVariableNames: 'HaloForAll IndicateKeyboardFocus MetaMenuForAll PreferredCornerRadius RememberProvenance UseSoftDropShadow'
- instanceVariableNames: 'bounds owner submorphs fullBounds color extension'
- classVariableNames: 'HaloForAll IndicateKeyboardFocus MetaMenuForAll PreferredCornerRadius UseSoftDropShadow'
poolDictionaries: ''
category: 'Morphic-Kernel'!
!Morph commentStamp: 'klc 3/14/2017 11:30' prior: 0!
A Morph (from the Greek "shape" or "form") is an interactive graphical object. General information on the Morphic system can be found at http://wiki.squeak.org/squeak/30.
Morphs exist in a tree, rooted at a World (generally a PasteUpMorph). The morphs owned by a morph are its submorphs. Morphs are drawn recursively; if a Morph has no owner it never gets drawn. To hide a Morph and its submorphs, set its #visible property to false using the #visible: method.
The World (screen) coordinate system is used for most coordinates, but can be changed if there is a TransformMorph somewhere in the owner chain.
My instance variables have accessor methods (e.g., #bounds, #bounds:). Most users should use the accessor methods instead of using the instance variables directly.
Structure:
instance var Type Description
bounds Rectangle A Rectangle indicating my position and a size that will enclose me.
owner Morph My parent Morph, or nil for the top-level Morph, which is a
or nil world, typically a PasteUpMorph.
submorphs Array My child Morphs.
fullBounds Rectangle A Rectangle minimally enclosing me and my submorphs.
color Color My primary color. Subclasses can use this in different ways.
extension MorphExtension Allows extra properties to be stored without adding a
or nil storage burden to all morphs.
By default, Morphs do not position their submorphs. Morphs may position their submorphs directly or use a LayoutPolicy to automatically control their submorph positioning.
Although Morph has some support for BorderStyle, most users should use BorderedMorph if they want borders.!
Item was added:
+ ----- Method: Morph class>>rememberProvenance (in category 'misc') -----
+ rememberProvenance
+
+ ^ RememberProvenance ifNil: [false]!
Item was added:
+ ----- Method: Morph class>>rememberProvenanceDuring: (in category 'misc') -----
+ rememberProvenanceDuring: aBlock
+ "self rememberProvenanceDuring: [self notify: 'Have a look at my debug menu :-)']"
+
+ | wasRemembering |
+ wasRemembering := RememberProvenance.
+ [RememberProvenance := true.
+ ^ aBlock value]
+ ensure: [RememberProvenance := wasRemembering].!
Item was added:
+ ----- Method: Morph>>browseCreatorMethod (in category 'debug and other') -----
+ browseCreatorMethod
+
+ ^ creatorMethod browse!
Item was changed:
----- Method: Morph>>buildDebugMenu: (in category 'debug and other') -----
buildDebugMenu: aHand
"Answer a debugging menu for the receiver. The hand argument is seemingly historical and plays no role presently"
| aMenu aPlayer |
aMenu := MenuMorph new defaultTarget: self.
aMenu addStayUpItem.
(self hasProperty: #errorOnDraw) ifTrue:
[aMenu add: 'start drawing again' translated action: #resumeAfterDrawError.
aMenu addLine].
(self hasProperty: #errorOnStep) ifTrue:
[aMenu add: 'start stepping again' translated action: #resumeAfterStepError.
aMenu addLine].
aMenu add: 'inspect morph' translated action: #inspectInMorphic:.
aMenu add: 'inspect owner chain' translated action: #inspectOwnerChain.
Smalltalk isMorphic ifFalse:
[aMenu add: 'inspect morph (in MVC)' translated action: #inspect].
self isMorphicModel ifTrue:
[aMenu add: 'inspect model' translated target: self model action: #inspect;
add: 'explore model' translated target: self model action: #explore].
(aPlayer := self player) ifNotNil:
[aMenu add: 'inspect player' translated target: aPlayer action: #inspect].
aMenu add: 'explore morph' translated target: self selector: #exploreInMorphic:.
aMenu addLine.
aPlayer ifNotNil:
[ aMenu add: 'viewer for Player' translated target: self player action: #beViewed.
aMenu balloonTextForLastItem: 'Opens a viewer on my Player -- this is the same thing you get if you click on the cyan "View" halo handle' translated ].
aMenu add: 'viewer for Morph' translated target: self action: #viewMorphDirectly.
aMenu balloonTextForLastItem: 'Opens a Viewer on this Morph, rather than on its Player' translated.
aMenu addLine.
aPlayer ifNotNil:
[aPlayer class isUniClass ifTrue: [
aMenu add: 'browse player class' translated target: aPlayer selector: #haveFullProtocolBrowsedShowingSelector: argumentList: #(nil)]].
aMenu add: 'browse morph class' translated target: self selector: #browseHierarchy.
+ self isMorphicModel
- (self isMorphicModel)
ifTrue: [aMenu
add: 'browse model class'
target: self model
selector: #browseHierarchy].
+ creatorMethod ifNotNil: [
+ aMenu add: 'browse creator method' action: #browseCreatorMethod].
aMenu addLine.
self addViewingItemsTo: aMenu.
aMenu
add: 'make own subclass' translated action: #subclassMorph;
add: 'save morph in file' translated action: #saveOnFile;
addLine;
add: 'call #tempCommand' translated action: #tempCommand;
add: 'define #tempCommand' translated action: #defineTempCommand;
addLine;
add: 'control-menu...' translated target: self selector: #invokeMetaMenu:;
add: 'edit balloon help' translated action: #editBalloonHelpText.
^ aMenu!
Item was changed:
----- Method: Morph>>initialize (in category 'initialization') -----
initialize
- "initialize the state of the receiver"
owner := nil.
submorphs := Array empty.
bounds := self defaultBounds.
+ color := self defaultColor.
+
+ self class rememberProvenance ifTrue: [
+ "Find first receiver in context stack below #new call"
+ | context creator nextContext |
+ context := thisContext home.
+ [context := context sender]
+ doWhileTrue: [context receiver = self].
+ creator := context receiver. "a class"
+ [(nextContext := context sender) receiver = creator]
+ whileTrue: [context := nextContext].
+ [context selector = #new]
+ whileTrue: [context := context sender].
+ creatorMethod := context method methodReference].!
- color := self defaultColor!
Levente Uzonyi uploaded a new version of Tools to project The Inbox:
http://source.squeak.org/inbox/Tools-ul.896.mcz
==================== Summary ====================
Name: Tools-ul.896
Author: ul
Time: 1 October 2019, 12:54:40.751477 pm
UUID: 928d41e7-79f9-46e0-bbb6-5e5b37adff69
Ancestors: Tools-mt.895
- moved Debugger specific extension methods of Context and InstructionStream to this package
=============== Diff against Tools-mt.895 ===============
Item was added:
+ ----- Method: Context>>namedTempAt: (in category '*Tools-debugger access') -----
+ namedTempAt: index
+ "Answer the value of the temp at index in the receiver's sequence of tempNames."
+ ^self debuggerMap namedTempAt: index in: self!
Item was added:
+ ----- Method: Context>>namedTempAt:put: (in category '*Tools-debugger access') -----
+ namedTempAt: index put: aValue
+ "Set the value of the temp at index in the receiver's sequence of tempNames.
+ (Note that if the value is a copied value it is also set out along the lexical chain,
+ but alas not in along the lexical chain.)."
+ ^self debuggerMap namedTempAt: index put: aValue in: self!
Item was added:
+ ----- Method: Context>>print:on: (in category '*Tools-debugger access') -----
+ print: anObject on: aStream
+ "Safely print anObject in the face of direct ProtoObject subclasses."
+ | objClass title |
+ objClass := self objectClass: anObject.
+ (objClass canUnderstand: #printOn:) ifTrue:
+ [^anObject printOn: aStream].
+ title := objClass name.
+ aStream
+ nextPutAll: (title first isVowel ifTrue: ['an '] ifFalse: ['a ']);
+ nextPutAll: title!
Item was added:
+ ----- Method: Context>>tempNames (in category '*Tools-debugger access') -----
+ tempNames
+ "Answer a SequenceableCollection of the names of the receiver's temporary
+ variables, which are strings."
+
+ ^ self debuggerMap tempNamesForContext: self!
Item was added:
+ ----- Method: Context>>tempsAndValues (in category '*Tools-debugger access') -----
+ tempsAndValues
+ "Return a string of the temporary variables and their current values"
+ ^self debuggerMap tempsAndValuesForContext: self!
Item was added:
+ ----- Method: Context>>tempsAndValuesLimitedTo:indent: (in category '*Tools-debugger access') -----
+ tempsAndValuesLimitedTo: sizeLimit indent: indent
+ "Return a string of the temporary variabls and their current values"
+
+ | aStream |
+ aStream := WriteStream on: (String new: 100).
+ self tempNames
+ doWithIndex: [:title :index |
+ indent timesRepeat: [aStream tab].
+ aStream nextPutAll: title; nextPut: $:; space; tab.
+ aStream nextPutAll:
+ ((self tempAt: index) printStringLimitedTo: (sizeLimit -3 -title size max: 1)).
+ aStream cr].
+ ^aStream contents!
Item was added:
+ ----- Method: InstructionStream>>abstractPC (in category '*Tools-Debugger-support') -----
+ abstractPC
+ ^self method abstractPCForConcretePC: pc!
Item was added:
+ ----- Method: InstructionStream>>debuggerMap (in category '*Tools-Debugger-support') -----
+ debuggerMap
+ ^self method debuggerMap!