Karl Ramberg uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-kfr.436.mcz
==================== Summary ====================
Name: Graphics-kfr.436
Author: kfr
Time: 22 August 2020, 11:47:40.557622 am
UUID: 50875d76-6a37-3c49-a0b7-97d9186fb2d6
Ancestors: Graphics-mt.433
I wanted to subclass Rectangle with a instance variable to carry some state, but these methodes indirected to Point>>corner: so it broke the override and returned a ordinary Rectangle instead of my fancy new subclass SuperRectangle
Updated to use #first to get the first element and #allButFirstDo: to iterate over the rest.
(Suggested by Levente Uzonyi)
=============== Diff against Graphics-mt.433 ===============
Item was changed:
----- Method: Rectangle class>>encompassing: (in category 'instance creation') -----
encompassing: listOfPoints
"A number of callers of encompass: should use this method."
| topLeft bottomRight |
+ topLeft := bottomRight := listOfPoints first.
+ listOfPoints allButFirstDo:
+ [:p |topLeft := topLeft min: p.
+ bottomRight := bottomRight max: p].
+ ^self origin: topLeft corner: bottomRight
+ !
- topLeft := bottomRight := nil.
- listOfPoints do:
- [:p | topLeft == nil
- ifTrue: [topLeft := bottomRight := p]
- ifFalse: [topLeft := topLeft min: p.
- bottomRight := bottomRight max: p]].
- ^ topLeft corner: bottomRight!
Item was changed:
----- Method: Rectangle class>>merging: (in category 'instance creation') -----
merging: listOfRects
"A number of callers of merge: should use this method."
+ | bottomRight topLeft |
+ topLeft := listOfRects first topLeft.
+ bottomRight := listOfRects first bottomRight.
- | minX minY maxX maxY |
listOfRects
+ allButFirstDo: [:r | topLeft := topLeft min: r topLeft.
+ bottomRight := bottomRight max: r bottomRight].
+ ^self origin: topLeft corner: bottomRight.
+ !
- do: [:r | minX
- ifNil: [minX := r topLeft x. minY := r topLeft y.
- maxX := r bottomRight x. maxY := r bottomRight y]
- ifNotNil: [minX := minX min: r topLeft x. minY := minY min: r topLeft y.
- maxX := maxX max: r bottomRight x. maxY := maxY max: r bottomRight y]].
- ^ minX@minY corner: maxX@maxY!
Eliot Miranda uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-eem.241.mcz
==================== Summary ====================
Name: Network-eem.241
Author: eem
Time: 20 August 2020, 11:39:42.945514 am
UUID: ec190e68-dd59-42c7-9b6a-5afd53adc703
Ancestors: Network-dtl.240
Add a primitive error code to primSocketReceiveDataAvailable:/primitiveSocketReceiveDataAvailable to attempt to shed light on persistent primitive failures when runing unit tests on MacOS.
=============== Diff against Network-dtl.240 ===============
Item was changed:
----- Method: Socket>>primSocketReceiveDataAvailable: (in category 'primitives') -----
primSocketReceiveDataAvailable: socketID
+ "Answer if data may be available for reading from the current socket."
- "Return true if data may be available for reading from the current socket."
+ <primitive: 'primitiveSocketReceiveDataAvailable' module: 'SocketPlugin' error: ec>
- <primitive: 'primitiveSocketReceiveDataAvailable' module: 'SocketPlugin'>
self primitiveFailed
!
Patrick Rein uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-pre.441.mcz
==================== Summary ====================
Name: Compiler-pre.441
Author: pre
Time: 20 August 2020, 10:19:13.607828 am
UUID: 25de8b68-cea6-db46-9d6a-f400bd5f8b82
Ancestors: Compiler-eem.440
Fixes an issue with pragma parsing matching a string or symbol literal with an angle bracket as an opening pragma bracket and correspondingly a closing string or symbol literal as a closing pragma.
=============== Diff against Compiler-eem.440 ===============
Item was changed:
----- Method: Parser>>pragmaSequence (in category 'pragmas') -----
pragmaSequence
"Parse a sequence of method pragmas."
+ [ (hereType == #binary and: [self matchToken: #<])
- [
- (self matchToken: #<)
ifFalse: [ ^ self ].
self pragmaStatement.
+ (hereType == #binary and: [self matchToken: #>])
- (self matchToken: #>)
ifFalse: [ ^ self expected: '>' ] ] repeat!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1169.mcz
==================== Summary ====================
Name: System-mt.1169
Author: mt
Time: 17 August 2020, 12:54:05.667289 pm
UUID: dfd26c6f-79f7-f146-95c1-78751d5f8f13
Ancestors: System-eem.1168
Clarify implementation of method timestamps.
Note that #hhmm24 cannot be used here, because it has no colon separator.
=============== Diff against System-eem.1168 ===============
Item was changed:
----- Method: Utilities class>>changeStamp (in category 'identification') -----
changeStamp
"Answer a string to be pasted into source code to mark who changed it and when."
^ self authorInitials , ' ' , Date today mmddyyyy, ' ',
+ (String streamContents: [:s | Time now print24: true showSeconds: false on: s])!
- ((String streamContents: [:s | Time now print24: true on: s]) copyFrom: 1 to: 5)!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1674.mcz
==================== Summary ====================
Name: Morphic-mt.1674
Author: mt
Time: 14 August 2020, 1:35:28.120535 pm
UUID: 9b6b3a33-4993-437b-b180-606d9be16223
Ancestors: Morphic-mt.1673
Fixes test12CustomEventDispatcher as reported:
- https://smalltalk.tech.blog/2020/08/10/smalltalks-successor/
- http://forum.world.st/A-Sad-Day-tp5120519.html
This also increases the robustess when loading code that overrides #processEvent: or #processEvent:using: without returning an event object but self.
=============== Diff against Morphic-mt.1673 ===============
Item was changed:
----- Method: MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: (in category 'support') -----
dispatchEvent: anEvent toSubmorphsOf: aMorph
"Dispatch the given event to the submorphs of the given morph. For coordinate transformations, work only with copies. Either return the given event or a copy of any filtered event to employ immutability to some extent. --- PRIVATE!!"
| localEvent filteredEvent |
aMorph submorphsDo: [:child |
localEvent := anEvent transformedBy: (child transformedFrom: aMorph).
+ filteredEvent := child processEvent: localEvent.
+ filteredEvent == #rejected ifFalse: [ "some event or #rejected symbol or any other object"
+ filteredEvent isMorphicEvent ifFalse: [filteredEvent := localEvent].
- filteredEvent := child
- processEvent: localEvent
- using: self. "use same dispatcher"
- filteredEvent == #rejected ifFalse: [ "some event or #rejected symbol"
self flag: #overlappingChildren. "mt: We cannot give two overlapping siblings the chance to handle the event!!"
^ self nextFromOriginal: anEvent local: localEvent filtered: filteredEvent]].
^ #rejected!
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.906.mcz
==================== Summary ====================
Name: Collections-mt.906
Author: mt
Time: 6 August 2020, 10:09:38.701052 am
UUID: 97d0d39c-6fe1-914b-bb0b-6a1b9a2b9715
Ancestors: Collections-eem.905
Adds shortcuts for remove/replace text attributes using a predicate.
=============== Diff against Collections-eem.905 ===============
Item was added:
+ ----- Method: Text>>removeAttributesThat: (in category 'converting') -----
+ removeAttributesThat: removalBlock
+ "Enumerate all attributes in the receiver. Remove those passing removalBlock."
+
+ self
+ removeAttributesThat: removalBlock
+ replaceAttributesThat: [:att | false]
+ by: nil.!
Item was added:
+ ----- Method: Text>>replaceAttributesThat:by: (in category 'converting') -----
+ replaceAttributesThat: replaceBlock by: convertBlock
+ "Enumerate all attributes in the receiver. Replace those passing replaceBlock after converting it through convertBlock."
+
+ self
+ removeAttributesThat: [:att | false]
+ replaceAttributesThat: replaceBlock
+ by: convertBlock.!