David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.978.mcz
==================== Summary ====================
Name: System-dtl.978
Author: dtl
Time: 16 November 2017, 7:58:19.05618 pm
UUID: 8f5f2399-537c-49b1-9daa-ae1864d08a1c
Ancestors: System-dtl.977
enterAsActiveSubprojectWithin: is currently meaningful only for Morphic projects, so move it from Project to MorphicProject. Original method stamp preserved.
=============== Diff against System-dtl.977 ===============
Item was removed:
- ----- Method: Project>>enterAsActiveSubprojectWithin: (in category 'enter') -----
- enterAsActiveSubprojectWithin: enclosingWorld
-
- "Install my ChangeSet, Transcript, and scheduled views as current globals.
-
- If returningFlag is true, we will return to the project from whence the current project was entered; don't change its previousProject link in this case.
- If saveForRevert is true, save the ImageSegment of the project being left.
- If revertFlag is true, make stubs for the world of the project being left.
- If revertWithoutAsking is true in the project being left, then always revert."
-
- "Experimental mods for initial multi-project work:
- 1. assume in morphic (this eliminated need for <showZoom>)
- 2. assume <saveForRevert> is false (usual case) - removed <old>
- 3. assume <revertFlag> is false
- 4. assume <revertWithoutAsking> is false - <forceRevert> now auto false <seg> n.u.
- 5. no zooming
- 6. assume <projectsSentToDisk> false - could be dangerous here
- 7. assume no isolation problems (isolationHead ==)
- 8. no closing scripts
- "
-
- self isCurrentProject ifTrue: [^ self].
-
- "guards ifNotNil: [
- guards := guards reject: [:obj | obj isNil].
- guards do: [:obj | obj okayToEnterProject ifFalse: [^ self]]
- ]."
-
- "CurrentProject makeThumbnail."
- "--> Display bestGuessOfCurrentWorld triggerClosingScripts."
- CurrentProject displayDepth: Display depth.
-
- displayDepth == nil ifTrue: [displayDepth := Display depth].
- "Display newDepthNoRestore: displayDepth."
-
- "(world hasProperty: #letTheMusicPlay)
- ifTrue: [world removeProperty: #letTheMusicPlay]
- ifFalse: [Smalltalk at: #ScorePlayer ifPresent: [:playerClass |
- playerClass allSubInstancesDo: [:player | player pause]]]."
-
- "returningFlag
- ifTrue: [nextProject := CurrentProject]
- ifFalse: [previousProject := CurrentProject]."
-
- "CurrentProject saveState."
- "CurrentProject := self."
- "Smalltalk newChanges: changeSet."
- "TranscriptStream newTranscript: transcript."
- "Sensor flushKeyboard."
- "recorderOrNil := Display pauseMorphicEventRecorder."
-
- "Display changeMorphicWorldTo: world." "Signifies Morphic"
- world
- installAsActiveSubprojectIn: enclosingWorld
- titled: self name.
-
- "recorderOrNil ifNotNil: [recorderOrNil resumeIn: world]."
- world triggerOpeningScripts.
- self removeParameter: #exportState.
- "self spawnNewProcessAndTerminateOld: true"!
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.1367.mcz
==================== Summary ====================
Name: Morphic-dtl.1367
Author: dtl
Time: 16 November 2017, 7:56:42.140175 pm
UUID: 3aa19889-422e-41c5-93d0-73bbcfaf7c00
Ancestors: Morphic-dtl.1366
enterAsActiveSubprojectWithin: is currently meaningful only for Morphic projects, so move it from Project to MorphicProject. Original method stamp preserved.
=============== Diff against Morphic-dtl.1366 ===============
Item was added:
+ ----- Method: MorphicProject>>enterAsActiveSubprojectWithin: (in category 'enter') -----
+ enterAsActiveSubprojectWithin: enclosingWorld
+
+ "Install my ChangeSet, Transcript, and scheduled views as current globals.
+
+ If returningFlag is true, we will return to the project from whence the current project was entered; don't change its previousProject link in this case.
+ If saveForRevert is true, save the ImageSegment of the project being left.
+ If revertFlag is true, make stubs for the world of the project being left.
+ If revertWithoutAsking is true in the project being left, then always revert."
+
+ "Experimental mods for initial multi-project work:
+ 1. assume in morphic (this eliminated need for <showZoom>)
+ 2. assume <saveForRevert> is false (usual case) - removed <old>
+ 3. assume <revertFlag> is false
+ 4. assume <revertWithoutAsking> is false - <forceRevert> now auto false <seg> n.u.
+ 5. no zooming
+ 6. assume <projectsSentToDisk> false - could be dangerous here
+ 7. assume no isolation problems (isolationHead ==)
+ 8. no closing scripts
+ "
+
+ self isCurrentProject ifTrue: [^ self].
+
+ "guards ifNotNil: [
+ guards := guards reject: [:obj | obj isNil].
+ guards do: [:obj | obj okayToEnterProject ifFalse: [^ self]]
+ ]."
+
+ "CurrentProject makeThumbnail."
+ "--> Display bestGuessOfCurrentWorld triggerClosingScripts."
+ CurrentProject displayDepth: Display depth.
+
+ displayDepth == nil ifTrue: [displayDepth := Display depth].
+ "Display newDepthNoRestore: displayDepth."
+
+ "(world hasProperty: #letTheMusicPlay)
+ ifTrue: [world removeProperty: #letTheMusicPlay]
+ ifFalse: [Smalltalk at: #ScorePlayer ifPresent: [:playerClass |
+ playerClass allSubInstancesDo: [:player | player pause]]]."
+
+ "returningFlag
+ ifTrue: [nextProject := CurrentProject]
+ ifFalse: [previousProject := CurrentProject]."
+
+ "CurrentProject saveState."
+ "CurrentProject := self."
+ "Smalltalk newChanges: changeSet."
+ "TranscriptStream newTranscript: transcript."
+ "Sensor flushKeyboard."
+ "recorderOrNil := Display pauseMorphicEventRecorder."
+
+ "Display changeMorphicWorldTo: world." "Signifies Morphic"
+ world
+ installAsActiveSubprojectIn: enclosingWorld
+ titled: self name.
+
+ "recorderOrNil ifNotNil: [recorderOrNil resumeIn: world]."
+ world triggerOpeningScripts.
+ self removeParameter: #exportState.
+ "self spawnNewProcessAndTerminateOld: true"!
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.977.mcz
==================== Summary ====================
Name: System-dtl.977
Author: dtl
Time: 15 November 2017, 8:22:41.646862 pm
UUID: 3d7fa082-cd00-4df2-8574-19b747bb5784
Ancestors: System-dtl.976
Initial rehabilitation of worlds in worlds. Changes are in Morphic and System packages.
To: squeak-dev(a)lists.squeakfoundation.org
From: Bob Arning <arning315(a)comcast.net>
Date: Tue, 14 Nov 2017 08:14:07 -0500
Subject: Re: [squeak-dev] ActiveWorld and World globals
Here is a start (squeak 5.1). Not extensively tested, but a FileList in
a world in the World was operational.
'From Squeak5.1 of 23 August 2016 [latest update: #16548] on 14 November 2017 at 8:11:28 am'!
"Change Set: fixProjectView
Date: 14 November 2017
Author: Bob Arning
squeak 5.1...
reinstate 'ENTER ACTIVE' option in menu for ProjectViewMorph "!
=============== Diff against System-dtl.976 ===============
Item was added:
+ ----- Method: Project>>enterAsActiveSubprojectWithin: (in category 'enter') -----
+ enterAsActiveSubprojectWithin: enclosingWorld
+
+ "Install my ChangeSet, Transcript, and scheduled views as current globals.
+
+ If returningFlag is true, we will return to the project from whence the current project was entered; don't change its previousProject link in this case.
+ If saveForRevert is true, save the ImageSegment of the project being left.
+ If revertFlag is true, make stubs for the world of the project being left.
+ If revertWithoutAsking is true in the project being left, then always revert."
+
+ "Experimental mods for initial multi-project work:
+ 1. assume in morphic (this eliminated need for <showZoom>)
+ 2. assume <saveForRevert> is false (usual case) - removed <old>
+ 3. assume <revertFlag> is false
+ 4. assume <revertWithoutAsking> is false - <forceRevert> now auto false <seg> n.u.
+ 5. no zooming
+ 6. assume <projectsSentToDisk> false - could be dangerous here
+ 7. assume no isolation problems (isolationHead ==)
+ 8. no closing scripts
+ "
+
+ self isCurrentProject ifTrue: [^ self].
+
+ "guards ifNotNil: [
+ guards := guards reject: [:obj | obj isNil].
+ guards do: [:obj | obj okayToEnterProject ifFalse: [^ self]]
+ ]."
+
+ "CurrentProject makeThumbnail."
+ "--> Display bestGuessOfCurrentWorld triggerClosingScripts."
+ CurrentProject displayDepth: Display depth.
+
+ displayDepth == nil ifTrue: [displayDepth := Display depth].
+ "Display newDepthNoRestore: displayDepth."
+
+ "(world hasProperty: #letTheMusicPlay)
+ ifTrue: [world removeProperty: #letTheMusicPlay]
+ ifFalse: [Smalltalk at: #ScorePlayer ifPresent: [:playerClass |
+ playerClass allSubInstancesDo: [:player | player pause]]]."
+
+ "returningFlag
+ ifTrue: [nextProject := CurrentProject]
+ ifFalse: [previousProject := CurrentProject]."
+
+ "CurrentProject saveState."
+ "CurrentProject := self."
+ "Smalltalk newChanges: changeSet."
+ "TranscriptStream newTranscript: transcript."
+ "Sensor flushKeyboard."
+ "recorderOrNil := Display pauseMorphicEventRecorder."
+
+ "Display changeMorphicWorldTo: world." "Signifies Morphic"
+ world
+ installAsActiveSubprojectIn: enclosingWorld
+ titled: self name.
+
+ "recorderOrNil ifNotNil: [recorderOrNil resumeIn: world]."
+ world triggerOpeningScripts.
+ self removeParameter: #exportState.
+ "self spawnNewProcessAndTerminateOld: true"!
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.976.mcz
==================== Summary ====================
Name: System-dtl.976
Author: dtl
Time: 15 November 2017, 8:01:35.111626 pm
UUID: cde703e1-3df1-4d6a-bde9-df95a3215ab6
Ancestors: System-eem.975
Remove unnecessary references to global World.
=============== Diff against System-eem.975 ===============
Item was changed:
----- Method: AutoStart class>>startUp: (in category 'initialization') -----
startUp: resuming
"The image is either being newly started (resuming is true), or it's just been snapshotted.
If this has just been a snapshot, skip all the startup stuff."
| startupParameters launchers |
self active ifTrue: [^self].
self active: true.
resuming ifFalse: [^self].
HTTPClient determineIfRunningInBrowser.
startupParameters := Smalltalk namedArguments.
(startupParameters includesKey: 'apiSupported' asUppercase )
ifTrue: [
HTTPClient browserSupportsAPI: ((startupParameters at: 'apiSupported' asUppercase) asUppercase = 'TRUE').
HTTPClient isRunningInBrowser
ifFalse: [HTTPClient isRunningInBrowser: true]].
+ Project current world ifNotNil: [:w | w install. w firstHand position: 100 @ 100 ].
- World ifNotNil: [:w | w install. w firstHand position: 100 @ 100 ].
"Some images might not have the UpdateStream package."
((self respondsTo: #checkForUpdates) and: [self checkForUpdates]) ifTrue: [^self].
self checkForPluginUpdate.
launchers := self installedLaunchers collect: [:launcher |
launcher new].
launchers do: [:launcher |
launcher parameters: startupParameters].
launchers do: [:launcher |
Project current addDeferredUIMessage: [launcher startUp]]!
Item was changed:
----- Method: ExternalDropHandler class>>defaultImageHandler (in category 'private') -----
defaultImageHandler
^ExternalDropHandler
type: 'image/'
extension: nil
action: [:stream :pasteUp :event |
| image sketch |
stream binary.
image := Form fromBinaryStream: stream contents asByteArray readStream.
Project current resourceManager
addResource: image
url: (FileDirectory urlForFileNamed: stream name) asString.
+ sketch := Project current world drawingClass withForm: image.
- sketch := World drawingClass withForm: image.
pasteUp addMorph: sketch centeredNear: event position.
image := sketch := nil]!
Item was changed:
----- Method: Preferences class>>classicTilesSettingToggled (in category 'updating - system') -----
classicTilesSettingToggled
"The current value of the largeTiles flag has changed; now react"
Smalltalk isMorphic ifTrue:
[Preferences universalTiles
ifFalse:
[self inform:
'note that this will only have a noticeable
effect if the universalTiles preference is
set to true, which it currently is not' translated]
ifTrue:
+ [Project current world recreateScripts]]!
- [World recreateScripts]]!
Item was changed:
----- Method: Preferences class>>largeTilesSettingToggled (in category 'updating - system') -----
largeTilesSettingToggled
"The current value of the largeTiles flag has changed; now react"
Smalltalk isMorphic ifTrue:
[Preferences universalTiles
ifFalse:
[self inform:
'note that this will only have a noticeable
effect if the universalTiles preference is
set to true, which it currently is not' translated]
ifTrue:
+ [Project current world recreateScripts]]!
- [World recreateScripts]]!
Item was changed:
----- Method: Preferences class>>storePreferencesIn: (in category 'initialization - save/load') -----
storePreferencesIn: aFileName
| stream prefsSnapshot |
#(Prevailing PersonalPreferences) do:
[:ea |
Parameters removeKey: ea ifAbsent: []].
stream := ReferenceStream fileNamed: aFileName.
stream nextPut: Parameters.
prefsSnapshot := preferencesDictionary copy.
prefsSnapshot keysAndValuesDo: [:key :pref | prefsSnapshot at: key put: pref asPreference].
stream nextPut: prefsSnapshot.
stream nextPut: (Smalltalk isMorphic
+ ifTrue:[Project current world fillStyle]
- ifTrue:[World fillStyle]
ifFalse:[self desktopColor]).
stream close!
Item was changed:
----- Method: Preferences class>>universalTilesSettingToggled (in category 'updating - system') -----
universalTilesSettingToggled
"The current value of the universalTiles flag has changed; now react"
(self preferenceAt: #universalTiles ifAbsent: [^ self]) localToProject ifFalse:
[^ self inform:
'This is troubling -- you may regret having done that, because
the change will apply to *all projects*, including pre-existing ones. Unfortunately this check is done after the damage is done, so you
may be hosed. Fortunately, however, you can simply reverse your choice right now and perhaps no deep damage will have been done.'].
self universalTiles "User just switched project to classic tiles"
ifFalse:
[self inform:
'CAUTION -- if you had any scripted objects in
this project that already used universal tiles,
there is no reasonable way to go back to classic
tiles. Recommended course of action in that case:
just toggle this preference right back to true.']
ifTrue:
[Preferences capitalizedReferences ifFalse:
[Preferences enable: #capitalizedReferences.
self inform:
'Note that the "capitalizedReferences" flag
has now been automatically set to true for
you, since this is required for the use of
universal tiles.'].
+ Project current isMorphic ifTrue:
+ [Project current world recreateScripts]]!
- World isMorph ifTrue:
- [World recreateScripts]]!
Item was changed:
----- Method: ResourceManager>>formChangedReminder (in category 'private') -----
formChangedReminder
+ ^[Project current world newResourceLoaded].!
- ^[World newResourceLoaded].!
Item was changed:
----- Method: SARInstaller>>openGraphicsFile: (in category 'client services') -----
openGraphicsFile: memberOrName
| member morph |
member := self memberNamed: memberOrName.
member ifNil: [ ^self errorNoSuchMember: memberOrName ].
+ morph := (Project current world drawingClass fromStream: member contentStream binary).
- morph := (World drawingClass fromStream: member contentStream binary).
morph ifNotNil: [ morph openInWorld ].
self installed: member.!
tim Rowledge uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-tpr.173.mcz
==================== Summary ====================
Name: Files-tpr.173
Author: tpr
Time: 15 November 2017, 3:10:56.694097 pm
UUID: 08650899-ae87-4c7d-8e87-258416826dc5
Ancestors: Files-ul.172
Add fileEntries and directoryEntries to return the actual entry objects; useful in some places wher fileNames/directoryNames + more processing might otherwise get used.
=============== Diff against Files-ul.172 ===============
Item was added:
+ ----- Method: FileDirectory>>directoryEntries (in category 'enumeration') -----
+ directoryEntries
+ "Return a collection of full entries for the subdirectories of this directory."
+ "FileDirectory default directoryEntries"
+
+ ^Array streamContents: [ :stream |
+ self entriesDo: [ :entry |
+ entry isDirectory ifTrue: [
+ stream nextPut: entry ]]]!
Item was added:
+ ----- Method: FileDirectory>>fileEntries (in category 'enumeration') -----
+ fileEntries
+ "Return a collection of the full entries for the files (but not directories) in this directory."
+ "FileDirectory default fileEntries"
+
+ ^Array streamContents: [ :stream |
+ self entriesDo: [ :entry |
+ entry isDirectory ifFalse: [
+ stream nextPut: entry ]]]!
David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.1364.mcz
==================== Summary ====================
Name: Morphic-dtl.1364
Author: dtl
Time: 15 November 2017, 8:04:47.876242 am
UUID: 2e7a474a-a9eb-45ba-8d25-798ec766be78
Ancestors: Morphic-dtl.1363
>From last commit, fix class side reference to world, and revert change to Morph>>deleted until it can be addressed properly.
=============== Diff against Morphic-dtl.1363 ===============
Item was changed:
----- Method: Morph>>delete (in category 'submorphs-add/remove') -----
delete
"Remove the receiver as a submorph of its owner and make its
new owner be nil."
| aWorld |
self removeHalo.
self isInWorld ifTrue: [
self disableSubmorphFocusForHand: self activeHand.
self activeHand
releaseKeyboardFocus: self;
releaseMouseFocus: self].
"Preserve world reference for player notificaiton. See below."
+ aWorld := self world ifNil: [World].
- aWorld := self world ifNil: [self world].
owner ifNotNil:[
self privateDelete.
self player ifNotNil: [:player |
player noteDeletionOf: self fromWorld: aWorld]].!
Item was changed:
----- Method: PluggableButtonMorph class>>roundedButtonCorners: (in category 'preferences') -----
roundedButtonCorners: aBoolean
+ | world |
RoundedButtonCorners := aBoolean.
+ world := Project current world.
+ world invalidRect: world bounds from: world.!
- World invalidRect: self world bounds from: self world.!
David T. Lewis uploaded a new version of GetText to project The Trunk:
http://source.squeak.org/trunk/GetText-dtl.43.mcz
==================== Summary ====================
Name: GetText-dtl.43
Author: dtl
Time: 14 November 2017, 10:50:26.259467 pm
UUID: 3de4bc20-be7d-4303-8a28-46be0055b23a
Ancestors: GetText-ul.42
Remove unnecessary references to global World.
=============== Diff against GetText-ul.42 ===============
Item was changed:
----- Method: LanguageEditor class>>ensureVisibilityOfWindow: (in category 'private') -----
ensureVisibilityOfWindow: aWindow
"private - activate the window"
+ | world |
+ world := Project current world.
- | |
aWindow expand.
aWindow comeToFront.
""
aWindow
+ right: (aWindow right min: world right).
- right: (aWindow right min: World right).
aWindow
+ bottom: (aWindow bottom min: world bottom).
- bottom: (aWindow bottom min: World bottom).
aWindow
+ left: (aWindow left max: world left).
- left: (aWindow left max: World left).
aWindow
+ top: (aWindow top max: world top).
- top: (aWindow top max: World top).
""
aWindow flash; flash!
Item was changed:
----- Method: LanguageEditor class>>openOn: (in category 'instance creation') -----
openOn: aLanguage
"open an instance on aLanguage"
| editor |
+ Project current world submorphs
- World submorphs
do: [:each | ""
((each isKindOf: LanguageEditor)
and: [each translator == aLanguage])
ifTrue: [""
self ensureVisibilityOfWindow: each.
^ self]].
""
editor := self on: aLanguage.
editor ifNotNil:[^editor openInWorld]!