[squeak-dev] The Trunk: System-mt.1178.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun Oct 11 11:36:30 UTC 2020
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1178.mcz
==================== Summary ====================
Name: System-mt.1178
Author: mt
Time: 11 October 2020, 1:36:25.615652 pm
UUID: fd8d0758-0935-c34c-8cb9-64d908b75f70
Ancestors: System-eem.1177
Refactoring 'Active' variables -- Step 2 of 2. Removes all uses of Active(World|Hand|Event) by replacing those with "self current(World|Hand|Event)" or "Project current world" when required to not add/cement Morphic dependency.
See http://forum.world.st/Changeset-Eliminating-global-state-from-Morphic-td5121690.html
=============== Diff against System-eem.1177 ===============
Item was changed:
----- Method: NativeImageSegment>>smartFillRoots: (in category 'read/write segment') -----
smartFillRoots: dummy
| refs known ours ww blockers |
"Put all traced objects into my arrayOfRoots. Remove some
that want to be in outPointers. Return blockers, an
IdentityDictionary of objects to replace in outPointers."
blockers := dummy blockers.
known := (refs := dummy references) size.
refs keys do: [:obj | "copy keys to be OK with removing items"
(obj isSymbol) ifTrue: [refs removeKey: obj. known := known-1].
(obj class == PasteUpMorph) ifTrue: [
obj isWorldMorph & (obj owner == nil) ifTrue: [
(dummy project ~~ nil and: [obj == dummy project world]) ifFalse: [
refs removeKey: obj. known := known-1.
blockers at: obj put:
(StringMorph contents: 'The worldMorph of a different world')]]].
"Make a ProjectViewMorph here"
"obj class == Project ifTrue: [Transcript show: obj; cr]."
(blockers includesKey: obj) ifTrue: [
refs removeKey: obj ifAbsent: [known := known+1]. known := known-1].
].
+ ours := (dummy project ifNil: [Project current]) world.
- ours := dummy project ifNotNil: [dummy project world] ifNil: [ActiveWorld].
refs keysDo: [:obj |
obj isMorph ifTrue: [
ww := obj world.
(ww == ours) | (ww == nil) ifFalse: [
refs removeKey: obj. known := known-1.
blockers at: obj put: (StringMorph contents:
obj printString, ' from another world')]]].
"keep original roots on the front of the list"
dummy rootObject do: [:rr | refs removeKey: rr ifAbsent: []].
(self respondsTo: #classOrganizersBeRoots:) ifTrue: "an EToys extension"
[self classOrganizersBeRoots: dummy].
^dummy rootObject, refs keys asArray!
Item was changed:
----- Method: Preferences class>>roundedWindowCornersChanged (in category 'updating - system') -----
roundedWindowCornersChanged
"The user changed the value of the roundedWindowCorners preference. React"
+ Project current world fullRepaintNeeded.!
- ActiveWorld fullRepaintNeeded!
Item was changed:
----- Method: Preferences class>>vectorVocabularySettingChanged (in category 'updating - system') -----
vectorVocabularySettingChanged
"The current value of the useVectorVocabulary flag has changed; now react. No senders, but invoked by the Preference object associated with the #useVectorVocabulary preference."
+ Smalltalk isMorphic ifFalse: [^ self].
+ Project current world makeVectorUseConformToPreference.!
- Smalltalk isMorphic ifTrue:
- [ActiveWorld makeVectorUseConformToPreference]!
Item was changed:
----- Method: RealEstateAgent class>>maximumUsableArea (in category 'accessing') -----
maximumUsableArea
+
+ ^ self maximumUsableAreaInWorld: Project current world!
- ^self maximumUsableAreaInWorld: ActiveWorld!
Item was changed:
----- Method: RealEstateAgent class>>maximumUsableAreaInWorld: (in category 'accessing') -----
maximumUsableAreaInWorld: aWorldOrNil
| allowedArea |
allowedArea := Display usableArea.
aWorldOrNil ifNotNil: [
- allowedArea := allowedArea intersect: aWorldOrNil visibleClearArea.
Smalltalk isMorphic ifTrue: [
+ allowedArea := allowedArea intersect: aWorldOrNil visibleClearArea.
(((Smalltalk classNamed: 'Flaps') ifNil: [false] ifNotNil: [:cls | cls anyFlapsVisibleIn: aWorldOrNil])
and: [self respondsTo: #reduceByFlaps:])
ifTrue: [allowedArea := self reduceByFlaps: allowedArea]]].
^allowedArea!
Item was changed:
----- Method: SARInstaller>>fileInMorphsNamed:addToWorld: (in category 'client services') -----
fileInMorphsNamed: memberName addToWorld: aBoolean
"This will load the Morph (or Morphs) from the given member.
Answers a Morph, or a list of Morphs, or nil if no such member or error.
If aBoolean is true, also adds them and their models to the World."
| member morphOrList |
member := self memberNamed: memberName.
+ member ifNil: [^ self errorNoSuchMember: memberName].
- member ifNil: [ ^self errorNoSuchMember: memberName ].
self installed: member.
+
-
morphOrList := member contentStream fileInObjectAndCode.
+ morphOrList ifNil: [^ nil].
+ aBoolean ifTrue: [Project current world addMorphsAndModel: morphOrList].
+
+ ^ morphOrList!
- morphOrList ifNil: [ ^nil ].
- aBoolean ifTrue: [ ActiveWorld addMorphsAndModel: morphOrList ].
-
- ^morphOrList
- !
More information about the Squeak-dev
mailing list
|