Marcel Taeumel uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-mt.284.mcz
==================== Summary ====================
Name: Network-mt.284
Author: mt
Time: 13 May 2024, 9:27:31.407237 am
UUID: f56aa4cd-7e14-5b47-8eb3-fff9032db2c0
Ancestors: Network-dtl.283
Complement Collections-ct.1067 and Collections-mt.1068
=============== Diff against Network-dtl.283 ===============
Item was changed:
----- Method: MailMessage>>excerpt (in category 'printing/formatting') -----
excerpt
"Return a short excerpt of the text of the message"
+ ^ self bodyText withSeparatorsCompacted truncateWithEllipsisTo: 60!
- ^ self bodyText withSeparatorsCompacted truncateWithElipsisTo: 60!
Marcel Taeumel uploaded a new version of HelpSystem-Core to project The Trunk:
http://source.squeak.org/trunk/HelpSystem-Core-mt.146.mcz
==================== Summary ====================
Name: HelpSystem-Core-mt.146
Author: mt
Time: 13 May 2024, 9:17:56.515237 am
UUID: 727879be-a73c-ba4b-9369-b3dd395fb259
Ancestors: HelpSystem-Core-ct.145
Complement Collections-ct.1067 and Collections-mt.1068
=============== Diff against HelpSystem-Core-ct.145 ===============
Item was changed:
----- Method: AbstractHelpTopic>>title (in category 'accessing') -----
title
"A brief description of this topic's contents."
+ ^ self contents truncateWithEllipsisTo: 20!
- ^ self contents truncateWithElipsisTo: 20!
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.1068.mcz
==================== Summary ====================
Name: Collections-mt.1068
Author: mt
Time: 13 May 2024, 9:14:06.416237 am
UUID: c204d0f0-3cb8-aa4d-a3d7-6d51ca9a6a8d
Ancestors: Collections-ct.1067
Extend commentary in #truncateWithElipsisTo:. Mark softly as deprecated for better tool support.
=============== Diff against Collections-ct.1067 ===============
Item was changed:
----- Method: String>>truncateWithElipsisTo: (in category 'converting') -----
truncateWithElipsisTo: maxLength
"Historical typo kept for compatibility."
+ self flag: #deprecated. "mt: Soft deprecation to see it in tools. Keep it in Collections package for best backwards compatibility. Due to the many older sources out there, I do not suppose that we would move this to *deprecated any time soon."
^ self truncateWithEllipsisTo: maxLength!
Chris Muller uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-cmm.207.mcz
==================== Summary ====================
Name: Files-cmm.207
Author: cmm
Time: 28 April 2024, 7:24:18.020282 pm
UUID: 7f3afa72-a69e-48be-aae7-a50900bfd4a3
Ancestors: Files-ul.206
- Support #currentDirectoryNickname from FileDirectory class>>#on:.
- Don't allow FileStream class>>#newFileNamed:do: and #forceNewFileNamed:do: to fail silently.
=============== Diff against Files-ul.206 ===============
Item was changed:
----- Method: FileDirectory class>>on: (in category 'instance creation') -----
on: pathString
"Return a new file directory for the given path, of the appropriate FileDirectory subclass for the current OS platform."
| pathName |
DirectoryClass ifNil: [self setDefaultDirectoryClass].
"If path ends with a delimiter (: or /) then remove it"
pathName := pathString.
(pathName at: pathName size ifAbsent: nil) = self pathNameDelimiter ifTrue:
[pathName := pathName allButLast].
DirectoryClass parentDirectoryNickname ifNotNil:
[:parentName|
(pathName beginsWith: parentName) ifTrue:
[pathName = parentName ifTrue:
[^self default containingDirectory].
(pathName at: parentName size + 1 ifAbsent: nil) = self pathNameDelimiter ifTrue:
[^self default containingDirectory on: (pathName allButFirst: parentName size + 1)]]].
+ DirectoryClass currentDirectoryNickname ifNotNil:
+ [: currentName|
+ (pathName beginsWith: currentName) ifTrue:
+ [pathName = currentName ifTrue:
+ [^self default].
+ (pathName at: currentName size + 1 ifAbsent: nil) = self pathNameDelimiter ifTrue:
+ [^self default on: (pathName allButFirst: currentName size + 1)]]].
+
^DirectoryClass new setPathName: pathName!
Item was changed:
----- Method: FileStream class>>forceNewFileNamed:do: (in category 'instance creation') -----
+ forceNewFileNamed: fileName do: aBlock
+ "Create a file named fileName and value aBlock with a ReadWriteStream on its contents, which is closed automatically upon completion of aBlock. If the file identified by fileName already exists, it will be replaced. If the file can't be created for any reason, signal an error."
+ ^ (self forceNewFileNamed: fileName)
+ ifNil: [ self error: 'file not created' ]
+ ifNotNil: [ : fileStream | self detectFile: fileStream do: aBlock ]!
- forceNewFileNamed: fileName do: aBlock
- "Avi Bryant says, ''This idiom is quite common in other languages that make heavy use of closures (i.e. Lisp (with-file 'foo' (f) ...) and Ruby (File.open('foo'){|f|...})). It's time Squeak had it, too.''
-
- Returns the result of aBlock."
-
- ^self detectFile: (self forceNewFileNamed: fileName) do: aBlock!
Item was changed:
----- Method: FileStream class>>newFileNamed:do: (in category 'instance creation') -----
+ newFileNamed: fileName do: aBlock
+ "Create a file named fileName and value aBlock with a ReadWriteStream on its contents, which is closed automatically upon completion of aBlock. If the file identified by fileName already exists, signal an error. If the file can't be created for any reason, signal an error."
+ ^ (self newFileNamed: fileName)
+ ifNil: [ self error: 'file not created' ]
+ ifNotNil: [ : fileStream | self detectFile: fileStream do: aBlock ]!
- newFileNamed: fileName do: aBlock
- "Avi Bryant says, ''This idiom is quite common in other languages that make heavy use of closures (i.e. Lisp (with-file 'foo' (f) ...) and Ruby (File.open('foo'){|f|...})). It's time Squeak had it, too.''
-
- Returns the result of aBlock."
-
- ^self detectFile: (self newFileNamed: fileName) do: aBlock!
Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2155.mcz
==================== Summary ====================
Name: Morphic-ct.2155
Author: ct
Time: 3 May 2024, 6:24:46.710377 pm
UUID: ea10ff8e-6579-4cd4-9131-d2af6e8a800a
Ancestors: Morphic-mt.2152
Fixes halo transfer to morphs that overlap with another morph that overlaps with the current halo. This was a regression from Morphic-ct.1794.
=============== Diff against Morphic-mt.2152 ===============
Item was changed:
----- Method: MorphicHaloDispatcher>>dispatchHalo:createFor: (in category 'dispatching') -----
dispatchHalo: anEvent createFor: aContainer
"Invoke a halo on any aContainer's submorph that wants it. Dispatch uses anEvent's #position. The dispatch only ends in that container if no other morph wants it. Note that the event's #shiftPressed state determines whether the dispatch goes innermost-to-outermost (if pressed) or the other way around (if not pressed).
If there already is a halo, check whether the event still points into the same hierarchy. If it does, do nothing here but rely on the halo itself to process the event (see implementors of #transferHalo:from:). If, however, the event points to a different hierarchy in the container, invoke a new halo and discard the current one. We do this here because the current halo should not bother with its container but only its #target."
| stack innermost haloTarget |
"The stack is the frontmost (i.e. innermost) to backmost (i.e. outermost) morph."
stack := (aContainer morphsAt: anEvent position unlocked: true useFullBounds: true) select:
[ : each | each wantsHaloFromClick or: [ each isRenderer ] ].
"self assert: [ stack last == aContainer ]."
innermost := anEvent hand halo
ifNil: [ stack first ]
ifNotNil:
[ : existingHalo |
"self assert: [ existingHalo wantsHaloFromClick not ]. "
stack
+ detect: [ : each | each owner == aContainer ]
- detect: [ : each | each owner == aContainer
- and: [ existingHalo bounds intersects: (existingHalo haloBoundsFor: each) ] ]
ifFound:
[ : topInContainer | "Is existingHalo's target part of the same topInContainer as the morph clicked?"
(existingHalo target withAllOwners includes: topInContainer)
ifTrue: [ "same hierarchy, let #transferHalo: continue to handle it for now." ^ false ]
ifFalse:
[ "different hierarchy, remove + add."
anEvent hand removeHalo.
anEvent shiftPressed
ifTrue: [ stack first ]
ifFalse: [ topInContainer ] ] ]
ifNone: [ "existingHalo is on the World, defer to #transferHalo: for now." ^ false ] ].
"If modifier key is pressed, start at innermost (the target), otherwise the outermost (direct child of the world (self))."
haloTarget := (innermost == aContainer or: [ anEvent shiftPressed ])
ifTrue: [ innermost ]
ifFalse:
[ "Find the outermost owner that wants it. Ignore containment above aContainer."
stack := innermost withAllOwners.
(stack first: (stack findFirst: [ : each | each owner == aContainer ])) reversed
detect: [ : each | each wantsHaloFromClick or: [ each isRenderer ] ]
ifNone: [ "haloTarget has its own mouseDown handler, don't halo." ^ false ] ].
"Now that we have the haloTarget, show the halo."
self invokeHaloOrMove: anEvent on: haloTarget.
^ true!
Chris Muller uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-cmm.147.mcz
==================== Summary ====================
Name: SUnit-cmm.147
Author: cmm
Time: 1 May 2024, 3:44:58.989279 pm
UUID: fa6494d6-4801-4f74-b349-938d8125ba74
Ancestors: SUnit-cmm.146
Revert cmm.146 and continue override #defaultTimeout instead.
=============== Diff against SUnit-cmm.146 ===============
Item was changed:
----- Method: TestCase>>debug (in category 'running') -----
debug
"Run the receiver and open a debugger on the first failure or error."
+ ^ self assureResourcesDuring: [self runCaseWithoutTimeout]!
- ^ self assureResourcesDuring: [self runCase]!
Item was changed:
----- Method: TestCase>>debugAsFailure (in category 'running') -----
debugAsFailure
"Spawn a debugger that is ready to debug the receiver."
(Process
forBlock: [self debug]
runUntil: [:context | context isClosureContext "navigate the process directly to the point where it is about to send #setUp"
+ and: [context selector = #runCaseWithoutTimeout]])
- and: [context selector = #runCase]])
debug.!