Bert Freudenberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-bf.1320.mcz
==================== Summary ====================
Name: Morphic-bf.1320
Author: bf
Time: 2 February 2017, 7:58:59.259248 am
UUID: 86c0cec8-927f-4a7a-a887-7acd59557096
Ancestors: Morphic-mdlh.1319
Fix steptime in UpdatingTextMorph by removing obsolete startSteppingSubmorphs mechanism. Nowadays the intoWorld mechanism in addMorph takes care of adding submorphs to stepList.
TODO: remove senders and deprecate
=============== Diff against Morphic-mdlh.1319 ===============
Item was changed:
----- Method: PasteUpMorph>>startSteppingSubmorphsOf: (in category 'world state') -----
startSteppingSubmorphsOf: aMorph
-
"Ensure that all submorphs of the given morph that want to be stepped are added to the step list. Typically used after adding a morph to the world."
+ self flag: #obsolete. "the intoWorld mechanism in addMorph nowadays takes care of adding submorphs to steplist"
- aMorph allMorphsDo: [:m |
- m wantsSteps ifTrue: [m arrangeToStartSteppingIn: m world].
- ]
+ " aMorph allMorphsDo: [:m |
+ aMorph ~~ m & m wantsSteps ifTrue: [
+ m arrangeToStartSteppingIn: m world]].
+ "
+
!
Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-jr.362.mcz
==================== Summary ====================
Name: Tests-jr.362
Author: jr
Time: 22 January 2017, 2:18:34.010832 am
UUID: 67cd6b66-44de-774a-bfea-625e0c50d00a
Ancestors: Tests-jr.361
add another test for Environments-jr.69
This time about not altering other environments when unbinding a symbol.
=============== Diff against Tests-jr.361 ===============
Item was added:
+ ----- Method: EnvironmentTest>>testUnbindDoesNotAlterImportedBindings (in category 'observation tests') -----
+ testUnbindDoesNotAlterImportedBindings
+ "When attempting to unbind a symbol, do not alter bindings outside of the envrionments'
+ own declarations."
+
+ | foreign foreignBinding one two |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign bind: #Griffle to: value.
+ foreignBinding := foreign associationAt: #Griffle.
+ env at: #Griffle put: Object new.
+ env importSelf.
+ env import: foreign.
+ one := env bindingOf: #Griffle.
+ self assert: one == foreignBinding description: 'imported binding'.
+
+ env unbind: #Griffle.
+ two := env bindingOf: #Griffle.
+ self assert: value equals: foreignBinding value description: 'imported value unaffacted'.
+ self assert: two == foreignBinding description: 'imported binding still in place'.!
Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-jr.361.mcz
==================== Summary ====================
Name: Tests-jr.361
Author: jr
Time: 22 January 2017, 2:03:39.879832 am
UUID: 198acafe-d1e1-9847-b530-bac77258f6c4
Ancestors: Tests-pre.360
add a test case for Environments-jr.69
=============== Diff against Tests-pre.360 ===============
Item was added:
+ ----- Method: EnvironmentTest>>testUnbindDoesNotDestroyImportedBindingsFromAnotherEnvironment (in category 'observation tests') -----
+ testUnbindDoesNotDestroyImportedBindingsFromAnotherEnvironment
+ "When a symbol is undeclared, the observing environments should not
+ lose a binding with the same key if that binding is actually imported from
+ self or a third environment."
+
+ | foreign foreignBinding one ownValue two three |
+ foreign := Environment withName: #Foreign.
+ foreign exportSelf.
+ foreign bind: #Griffle to: value.
+ foreignBinding := foreign associationAt: #Griffle.
+ env importSelf.
+ env import: foreign.
+ one := env bindingOf: #Griffle.
+ self assert: one == foreignBinding description: 'imported binding'.
+ self assert: one value == value description: 'imported binding'.
+
+ ownValue := Object new.
+ env bind: #Griffle to: ownValue.
+ two := env bindingOf: #Griffle.
+ self assert: one ~~ two description: 'new binding'.
+
+ foreign unbind: #Griffle.
+ self assert: nil equals: one value description: 'imported binding undeclared'.
+ three := env bindingOf: #Griffle.
+ self assert: two == three description: 'own binding unaffected'.
+ self assert: three value == ownValue description: 'own binding''s value unaffected'.!
Marcel Taeumel uploaded a new version of Protocols to project The Trunk:
http://source.squeak.org/trunk/Protocols-jr.58.mcz
==================== Summary ====================
Name: Protocols-jr.58
Author: jr
Time: 4 November 2016, 7:41:55.914699 pm
UUID: 5b7d26fb-0bed-d841-9978-68893217f05e
Ancestors: Protocols-tfel.57
add missing nesting to mainCategoryListMenu
#addList: expects a list of tuples
=============== Diff against Protocols-tfel.57 ===============
Item was changed:
----- Method: Lexicon>>mainCategoryListMenu: (in category 'category list') -----
mainCategoryListMenu: aMenu
"Answer the menu for the category list"
<categoryListMenu>
+ ^ aMenu addList: #(('find...(f)' obtainNewSearchString)); yourself!
- ^ aMenu addList: #('find...(f)' obtainNewSearchString); yourself!
Marcel Taeumel uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-jr.69.mcz
==================== Summary ====================
Name: Environments-jr.69
Author: jr
Time: 22 January 2017, 1:58:32.760832 am
UUID: bef4785f-f66c-1246-bae6-6a15be9aaf33
Ancestors: Environments-jr.68
prevent the removal of third-party imported bindings
Previously, when environment T imported from A and B, which both had a binding for #x, unbinding #x from either A or B would remove the binding from T.
Now if the binding of #x is removed from A it will only be removed from T if T actually uses the binding from A, but not if T uses the binding from B.
It also prevents an environment A from unbinding something in an imported environment B when A imports itself and A and B both have a declaration with the same key.
=============== Diff against Environments-jr.68 ===============
Item was changed:
----- Method: Environment>>hideBinding: (in category 'binding') -----
hideBinding: aBinding
+ (bindings bindingOf: aBinding key) == aBinding ifFalse: [^ self].
self undeclare: aBinding key from: bindings!
Marcel Taeumel uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-jr.68.mcz
==================== Summary ====================
Name: Environments-jr.68
Author: jr
Time: 22 January 2017, 1:28:18.011832 am
UUID: 41256adf-d98a-4c4f-8bb6-6e5d800a4014
Ancestors: Environments-nice.67
add a convenience method to activate an environment during a block
=============== Diff against Environments-nice.67 ===============
Item was added:
+ ----- Method: Environment>>beCurrentDuring: (in category 'as yet unclassified') -----
+ beCurrentDuring: aBlock
+ "Evaluate aBlock with me as the current dynamic Environment"
+ ^ aBlock on: CurrentEnvironment do: [:e | e resume: self]!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-dtl.1056.mcz
==================== Summary ====================
Name: Kernel-dtl.1056
Author: dtl
Time: 2 February 2017, 1:48:45.677072 am
UUID: f56b3bcb-a051-481b-a90c-024a72acc1d7
Ancestors: Kernel-dtl.1055
Fix typo in error message
=============== Diff against Kernel-dtl.1055 ===============
Item was changed:
----- Method: Behavior>>basicNew: (in category 'instance creation') -----
basicNew: sizeRequested
"Primitive. Answer an instance of this class with the number of indexable
variables specified by the argument, sizeRequested. Fail if this class is not
indexable or if the argument is not a positive Integer, or if there is not
enough memory available. Essential. See Object documentation whatIsAPrimitive.
If the primitive fails because space is low then the scavenger will run before the
method is activated. Check args and retry via handleFailingBasicNew: if they're OK."
<primitive: 71 error: ec>
(ec == #'insufficient object memory') ifTrue:
[^self handleFailingBasicNew: sizeRequested].
(ec == #'bad argument') ifTrue:
+ [self error: self printString, ' called #basicNew: with invalid argument ', sizeRequested].
- [self error: self printString, ' called #basicNew: with invalid arugment ', sizeRequested].
self isVariable ifFalse:
[self error: self printString, ' cannot have variable sized instances'].
self primitiveFailed!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-dtl.1055.mcz
==================== Summary ====================
Name: Kernel-dtl.1055
Author: dtl
Time: 2 February 2017, 1:46:01.637724 am
UUID: 72bb2b4b-bdd2-4057-a312-e26db93d0245
Ancestors: Kernel-nice.1054, Kernel-cbc.1054
Merge Kernel-nice.1054, Kernel-cbc.1054
=============== Diff against Kernel-nice.1054 ===============
Item was changed:
----- Method: Behavior>>basicNew: (in category 'instance creation') -----
basicNew: sizeRequested
"Primitive. Answer an instance of this class with the number of indexable
variables specified by the argument, sizeRequested. Fail if this class is not
indexable or if the argument is not a positive Integer, or if there is not
enough memory available. Essential. See Object documentation whatIsAPrimitive.
If the primitive fails because space is low then the scavenger will run before the
method is activated. Check args and retry via handleFailingBasicNew: if they're OK."
<primitive: 71 error: ec>
+ (ec == #'insufficient object memory') ifTrue:
- (ec == #'insufficient object memory' or: [ec == #'bad argument']) ifTrue:
[^self handleFailingBasicNew: sizeRequested].
+ (ec == #'bad argument') ifTrue:
+ [self error: self printString, ' called #basicNew: with invalid arugment ', sizeRequested].
self isVariable ifFalse:
[self error: self printString, ' cannot have variable sized instances'].
self primitiveFailed!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-cbc.1054.mcz
==================== Summary ====================
Name: Kernel-cbc.1054
Author: cbc
Time: 27 January 2017, 9:06:02.080673 am
UUID: 4707f619-341d-7241-918f-6c3215f93fce
Ancestors: Kernel-eem.1053
Fixes Behaviour>>basicNew: to recognize and invalid arugment and raise an appropriate error (not an 'out of memory' error).
=============== Diff against Kernel-eem.1053 ===============
Item was changed:
----- Method: Behavior>>basicNew: (in category 'instance creation') -----
basicNew: sizeRequested
"Primitive. Answer an instance of this class with the number of indexable
variables specified by the argument, sizeRequested. Fail if this class is not
indexable or if the argument is not a positive Integer, or if there is not
enough memory available. Essential. See Object documentation whatIsAPrimitive.
If the primitive fails because space is low then the scavenger will run before the
method is activated. Check args and retry via handleFailingBasicNew: if they're OK."
<primitive: 71 error: ec>
+ (ec == #'insufficient object memory') ifTrue:
- (ec == #'insufficient object memory' or: [ec == #'bad argument']) ifTrue:
[^self handleFailingBasicNew: sizeRequested].
+ (ec == #'bad argument') ifTrue:
+ [self error: self printString, ' called #basicNew: with invalid arugment ', sizeRequested].
self isVariable ifFalse:
[self error: self printString, ' cannot have variable sized instances'].
self primitiveFailed!