Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1182.mcz
==================== Summary ====================
Name: Kernel-eem.1182
Author: eem
Time: 26 July 2018, 8:33:34.998936 pm
UUID: 4d10c2e2-c1b7-4ba0-b208-b018f0f099e9
Ancestors: Kernel-eem.1181
Add an accessor for Mutex being owned, for use in tests.
=============== Diff against Kernel-eem.1181 ===============
Item was added:
+ ----- Method: Mutex>>isOwned (in category 'testing') -----
+ isOwned
+ "Answer if the receiver is owned. DO NOT USE THIS IN NORMAL CODE.
+ This exists for the MutexTests so they don't have to use e.g. instVarNamed:.
+ N.B. don't use notNil because that is a real send and preemptable."
+ ^nil ~~ owner!
tim Rowledge uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-tpr.400.mcz
==================== Summary ====================
Name: Graphics-tpr.400
Author: tpr
Time: 23 July 2018, 11:09:20.311791 am
UUID: 83d0ab30-01d7-4753-9fee-577471f5cd22
Ancestors: Graphics-eem.399
Update the font summary string to a Text with appropriate font settings that match the name of the font being described.
It doesn't show up in the help browser correctly because of problems as described in http://forum.world.st/Improving-SqueakToolsHelp-class-fontSizeSummary-revea…
When we fix that, the fonts summary will magically look better.
=============== Diff against Graphics-eem.399 ===============
Item was changed:
----- Method: TextStyle class>>fontSizeSummaryContents (in category 'utilities') -----
fontSizeSummaryContents
+ ^ Text streamContents:
- ^ String streamContents:
[:aStream |
self knownTextStyles do: [:aStyleName |
aStream nextPutAll:
+ (aStyleName asText addAttribute: (TextFontReference toFont: (TextStyle named: aStyleName) defaultFont)), ' ',
- aStyleName, ' ',
(self fontPointSizesFor: aStyleName) asArray storeString.
aStream cr]].!
tim Rowledge uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-tpr.400.mcz
==================== Summary ====================
Name: Graphics-tpr.400
Author: tpr
Time: 23 July 2018, 11:09:20.311791 am
UUID: 83d0ab30-01d7-4753-9fee-577471f5cd22
Ancestors: Graphics-eem.399
Update the font summary string to a Text with appropriate font settings that match the name of the font being described.
It doesn't show up in the help browser correctly because of problems as described in http://forum.world.st/Improving-SqueakToolsHelp-class-fontSizeSummary-revea…
When we fix that, the fonts summary will magically look better.
=============== Diff against Graphics-eem.399 ===============
Item was changed:
----- Method: TextStyle class>>fontSizeSummaryContents (in category 'utilities') -----
fontSizeSummaryContents
+ ^ Text streamContents:
- ^ String streamContents:
[:aStream |
self knownTextStyles do: [:aStyleName |
aStream nextPutAll:
+ (aStyleName asText addAttribute: (TextFontReference toFont: (TextStyle named: aStyleName) defaultFont)), ' ',
- aStyleName, ' ',
(self fontPointSizesFor: aStyleName) asArray storeString.
aStream cr]].!
David T. Lewis uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-dtl.802.mcz
==================== Summary ====================
Name: Collections-dtl.802
Author: dtl
Time: 19 July 2018, 12:40:11.186143 am
UUID: 95497d30-f52f-4f82-ac8c-3e65cfa30df1
Ancestors: Collections-cmm.801
Change Text class>>string:runs: to call setString:setRunsChecking: instead of setString:setRuns: to prevent creating a Text with run length not matching string length. This fixes the problem originally reported by Tim Johnson in http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-July/199461.html
Add patch by K K Subbu to fix instantiating text when the string and the runarray are of mismatched lengths. This allows a filein to retain text attributes even if the runarray does not match the string length, as may be the case for a fileIn that had been edited externally (otherwise the text will be converted to a string without the intended attributes).
Name: Collections-kks.803
Author: kks
Time: 14 July 2018, 11:14:34.247017 pm
UUID: c6ea08ba-fcdd-46f8-89c0-c61d0d524531
Ancestors: Collections-dtl.802
Attempt to retain as much styling as possible while filing in text from streams where the runs may fall short or extend beyond the string.
Based on Bob's suggestions at http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-July/199530.html
=============== Diff against Collections-cmm.801 ===============
Item was changed:
----- Method: Text class>>string:runs: (in category 'private') -----
string: aString runs: anArray
+ ^self basicNew setString: aString setRunsChecking: anArray!
- ^self basicNew setString: aString setRuns: anArray!
Item was changed:
----- Method: Text>>setString:setRunsChecking: (in category 'private') -----
setString: aString setRunsChecking: aRunArray
+ | stringSize runsSize |
- "Check runs and do the best you can to make them fit..."
-
string := aString.
- "check the runs"
aRunArray ifNil: [^ aString asText].
- (aRunArray isKindOf: RunArray) ifFalse: [^ aString asText].
- aRunArray runs size = aRunArray values size ifFalse: [^ aString asText].
- aRunArray size = aString size ifFalse: [^ aString asText].
+ "Check runs and do the best you can to make them fit..."
+ aRunArray runs size = aRunArray values size ifFalse: [^ aString asText]. "raise error here?"
+ runsSize := aRunArray size.
+ stringSize := string size.
+ runs := stringSize = runsSize
+ ifTrue: [aRunArray]
+ ifFalse: [ stringSize > runsSize
+ ifTrue: [aRunArray addLast: {} times: stringSize - runsSize]
+ ifFalse: [aRunArray copyFrom: 1 to: stringSize]].!
- runs := aRunArray.!
Chris Muller uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-cmm.292.mcz
==================== Summary ====================
Name: CollectionsTests-cmm.292
Author: cmm
Time: 15 July 2018, 4:35:41.160412 pm
UUID: 8202d04e-6911-4849-8fe8-d2171640b1e3
Ancestors: CollectionsTests-dtl.291
It turns out better and more consistent for String>>#condensedIntoOneLine to do a uniform conversion than trimBlanks.
=============== Diff against CollectionsTests-dtl.291 ===============
Item was changed:
----- Method: StringTest>>testCondensedIntoOneLine (in category 'tests - converting') -----
testCondensedIntoOneLine
+ self assert: ' abc d ' condensedIntoOneLine = ' abc d '.
- self assert: ' abc d ' condensedIntoOneLine = 'abc d'.
self assert: '
(2
to: 10
by: 2)
+ ' condensedIntoOneLine = ' (2 to: 10 by: 2) '.
- ' condensedIntoOneLine = '(2 to: 10 by: 2)'.
"all blanks"
self assert:
(((0 to: 255)
collect: [ : each | each asCharacter ]
+ thenSelect: [ : each | each isSeparator ]) as: String) condensedIntoOneLine = String space.
- thenSelect: [ : each | each isSeparator ]) as: String) condensedIntoOneLine = String empty.
"no blanks"
self assert: 'abcd' condensedIntoOneLine = 'abcd'.
+ "Ensure every 'abcd' in this CompiledMethod is the same one for validity of next assertion."
- "Ensure every 'abcd' in this CompiledMethod is the same one."
self assert: 'abcd' == 'abcd'.
"supposed to always copy no matter what"
self assert: 'abcd' condensedIntoOneLine ~~ 'abcd'!