Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.397.mcz
==================== Summary ====================
Name: Tests-ul.397
Author: ul
Time: 14 June 2018, 11:28:35.102959 pm
UUID: 7cc15100-1821-4093-b549-f524fc76a6c4
Ancestors: Tests-dtl.396
- do not nag the user about setting the author initials
=============== Diff against Tests-dtl.396 ===============
Item was changed:
----- Method: ArrayLiteralTest>>testReservedIdentifiers (in category 'tests') -----
testReservedIdentifiers
+ self class compileSilently: 'array ^ #(nil true false)'.
- self class compile: 'array ^ #(nil true false)'.
self assert: self array = {nil. true. false}.!
Item was changed:
----- Method: ArrayLiteralTest>>testSymbols (in category 'tests') -----
testSymbols
+ self class compileSilently: 'array ^ #(#nil #true #false #''nil'' #''true'' #''false'')'.
- self class compile: 'array ^ #(#nil #true #false #''nil'' #''true'' #''false'')'.
self assert: self array = {#nil. #true. #false. #nil. #true. #false}.!
Item was added:
+ ----- Method: ClassRemovalTest>>performTest (in category 'as yet unclassified') -----
+ performTest
+
+ Utilities
+ useAuthorInitials: self className
+ during: [ super performTest ]!
Item was changed:
----- Method: DecompilerTests>>testDecompileLoopWithMovingLimit (in category 'tests') -----
testDecompileLoopWithMovingLimit
"This is a non regression test for http://bugs.squeak.org/view.php?id=7093"
| decompiledCode sourceCode |
sourceCode := 'loopWithMovingLimit
"This loop might be decompiled as a to:do: but should not because it does modify its limit"
| n i |
n := 4.
i := 1.
[i <= n] whileTrue: [
n := n - 1.
i := i + 1].
^n'.
+ self class compileSilently: sourceCode.
- self class compile: sourceCode.
self assert: (self class includesSelector: #loopWithMovingLimit).
self assert: 2 equals: (self perform: #loopWithMovingLimit).
decompiledCode := self class decompile: #loopWithMovingLimit.
+ self class compileSilently: decompiledCode decompileString.
- self class compile: decompiledCode decompileString.
self
assert: 2
equals: (self perform: #loopWithMovingLimit)
description: 'result from decompiledCode should not differ from sourceCode'.!
Item was changed:
----- Method: EnvironmentTest>>testInternalVisibility (in category 'compiling tests') -----
testInternalVisibility
"A method on a class in an environment
can refer to other classes in that environment
(provided the environment imports its self)"
| griffle plonk |
env importSelf.
self createClass: #Griffle.
self createClass: #Plonk.
griffle := env at: #Griffle.
+ griffle compileSilently: 'plonk ^ Plonk'.
- griffle compile: 'plonk ^ Plonk'.
plonk := griffle new plonk.
self assert: (env at: #Plonk) == plonk!
Item was changed:
----- Method: EnvironmentTest>>testStoreDomesticValue (in category 'compiling tests') -----
testStoreDomesticValue
"Create a class that implements #doStore.
(see the comment in #storeValueMethod.)
Send the message, then examine the results.
The two values should be identical."
| griffle values |
env importSelf.
env from: Smalltalk globals import: #Object.
self createClass: #Griffle.
env bind: #Plonk to: value.
griffle := env at: #Griffle.
+ griffle compileSilently: self storeValueMethod.
- griffle compile: self storeValueMethod.
values := griffle new doStore.
self assert: values isArray.
self assert: values size = 2.
self assert: values first == values last.
self assert: (env valueOf: #Plonk) == values first!
Item was changed:
----- Method: EnvironmentTest>>testStoreImportedValue (in category 'compiling tests') -----
testStoreImportedValue
"Create a class that implements #doStore.
Import #Plonk from another environment.
(see the comment in #storeValueMethod.)
Send the message, then examine the results.
The two values should be identical."
| griffle foreign values |
self createClass: #Griffle.
foreign := Environment withName: #Foreign.
foreign exportSelf.
foreign at: #Plonk put: 'v1'.
env from: foreign import: #Plonk.
env from: Smalltalk globals import: #Object.
griffle := env at: #Griffle.
+ griffle compileSilently: self storeValueMethod.
- griffle compile: self storeValueMethod.
values := griffle new doStore.
self assert: values isArray.
self assert: values size = 2.
self assert: values first == values last.
self assert: (foreign at: #Plonk) == values first!
Chris Cunningham uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cbc.1452.mcz
==================== Summary ====================
Name: Morphic-cbc.1452
Author: cbc
Time: 13 June 2018, 7:45:19.342537 pm
UUID: 16e46d7e-75d2-9047-a872-6f069d65920f
Ancestors: Morphic-cbc.1451
Recategorized #referencePositionInWorld (and setter) to be with related methods.
Fixed #adjustAfter: to once again allow halo rotation of morphs to actually rotate around the rotationCenter (instead of center of the morph).
=============== Diff against Morphic-cbc.1451 ===============
Item was added:
+ ----- Method: Morph>>referencePositionInWorld (in category 'rotate scale and flex') -----
+ referencePositionInWorld
+
+ ^ self pointInWorld: self referencePosition
+ !
Item was added:
+ ----- Method: Morph>>referencePositionInWorld: (in category 'rotate scale and flex') -----
+ referencePositionInWorld: aPoint
+ | localPosition |
+ localPosition := owner
+ ifNil: [aPoint]
+ ifNotNil: [(owner transformFrom: self world) globalPointToLocal: aPoint].
+
+ self referencePosition: localPosition
+ !
Item was changed:
----- Method: TransformationMorph>>adjustAfter: (in category 'private') -----
adjustAfter: changeBlock
"Cause this morph to remain cetered where it was before, and
choose appropriate smoothing, after a change of scale or rotation."
| oldRefPos |
oldRefPos := self referencePosition.
changeBlock value.
self chooseSmoothing.
+ self penUpWhile: [self position: self position + (oldRefPos - self referencePosition)].
- self actorStateOrNil ifNotNil:[
- self penUpWhile: [self position: self position + (oldRefPos - self referencePosition)].
- ].
self layoutChanged.
owner ifNotNil: [owner invalidRect: bounds]
!
Levente Uzonyi uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ul.240.mcz
==================== Summary ====================
Name: MorphicExtras-ul.240
Author: ul
Time: 13 June 2018, 1:27:39.374351 pm
UUID: 1f754fe4-0f18-4d99-aeb5-01f6a3c095f9
Ancestors: MorphicExtras-pre.239
- set AuthorName during EPSCanvasTest to avoid nagging users about it
=============== Diff against MorphicExtras-pre.239 ===============
Item was added:
+ ----- Method: EPSCanvasTest>>performTest (in category 'private') -----
+ performTest
+
+ Utilities
+ useAuthorName: self className
+ during: [ super performTest ]!
Levente Uzonyi uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ul.1034.mcz
==================== Summary ====================
Name: System-ul.1034
Author: ul
Time: 13 June 2018, 1:24:43.197886 pm
UUID: b5a05a72-7c75-4bdb-95bc-b7d1b31eb83b
Ancestors: System-nice.1033
- added Utilities class >> #useAuthorName:during:, which works just like #useAuthorInitials:during: but with AuthorName instead of AuthorInitials
=============== Diff against System-nice.1033 ===============
Item was added:
+ ----- Method: Utilities class>>useAuthorName:during: (in category 'identification') -----
+ useAuthorName: temporaryAuthorName during: aBlock
+
+ | originalAuthorName |
+ originalAuthorName := AuthorName.
+ [
+ AuthorName := temporaryAuthorName.
+ aBlock value ]
+ ensure: [ AuthorName := originalAuthorName ]
+ !
Chris Cunningham uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cbc.1451.mcz
==================== Summary ====================
Name: Morphic-cbc.1451
Author: cbc
Time: 12 June 2018, 10:20:33.204594 pm
UUID: eeba2c6d-1d3b-8c4f-9798-2d5f590eb318
Ancestors: Morphic-cbc.1450
Fix so that Projects>Jump To Project submenu is readable in dark color themes (by commenting out setting of the color - default works much better).
=============== Diff against Morphic-cbc.1450 ===============
Item was changed:
----- Method: MorphicProject>>addItem:toMenu:selection:color:thumbnail: (in category 'utilities') -----
addItem: item toMenu: menu selection: action color: aColor thumbnail: aForm
"Add menu item representing the sender to a menu"
+ "Removed setting the color - it wasn't working well with dark color themes."
menu
add: item
selector: #jumpToSelection:
argument: action.
- menu lastItem color: aColor.
aForm isNil
ifFalse: [menu lastItem
icon: (aForm
scaledIntoFormOfSize: (Preferences tinyDisplay
ifTrue: [16]
ifFalse: [28]))]!