Bob's changes are in the inbox as System-dtl.977 and Morphic-dtl.1365.
Try the ENTER ACTIVE menu selection in a project view morph to test. It is quite easy to find your way to an emergency evaluator, so I put in into inbox rather than trunk for the time being. Dave On Wed, Nov 15, 2017 at 03:39:49PM +0100, H. Hirzel wrote: > Bob's changes involve 4 methods > > PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld at: > newBounds titled: aString > PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld titled: aString > Project>>enterAsActiveSubprojectWithin: enclosingWorld > ProjectViewMorph>>enterAsActiveSubproject > > > BTW this involves the mysterious 'AlignmentMorphBob1'..... > > Hannes > > > > Here is the code (unpacked fixProjectView.14Nov0811.cs.gz) to make it > easier for people to have a look at it. > > > > '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 "! > > > !PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 07:47'! > installAsActiveSubprojectIn: enclosingWorld at: newBounds titled: aString > | window howToOpen tm boundsForWorld | > howToOpen := self embeddedProjectDisplayMode. > "#scaled may be the only one that works at the moment" > submorphs do: [:ss | ss owner isNil ifTrue: [ss privateOwner: self]]. > "Transcript that was in outPointers and then got deleted." > boundsForWorld := howToOpen == #naked ifTrue: [newBounds] ifFalse: [bounds]. > worldState canvas: nil. > worldState viewBox: boundsForWorld. > self bounds: boundsForWorld. > > "self viewBox: Display boundingBox." > "worldState handsDo: [:h | h initForEvents]." > self installFlaps. > > "SystemWindow noteTopWindowIn: self." > "self displayWorldSafely." > howToOpen == #naked ifTrue: [enclosingWorld addMorphFront: self]. > howToOpen == #window > ifTrue: > [window := (SystemWindow labelled: aString) model: self. > window addMorph: self frame: (0 @ 0 extent: 1.0 @ 1.0). > window openInWorld: enclosingWorld]. > howToOpen == #frame > ifTrue: > [window := (AlignmentMorphBob1 new) > minWidth: 100; > minHeight: 100; > borderWidth: 8; > borderColor: Color green; > bounds: newBounds. > window addMorph: self. > window openInWorld: enclosingWorld]. > howToOpen == #scaled > ifTrue: > [self position: 0 @ 0. > window := (EmbeddedWorldBorderMorph new) > minWidth: 100; > minHeight: 100; > borderWidth: 8; > borderColor: Color green; > bounds: newBounds. > tm := BOBTransformationMorph new. > window addMorph: tm. > tm addMorph: self. > window openInWorld: enclosingWorld. > tm changeWorldBoundsToShow: bounds. > self arrangeToStartSteppingIn: enclosingWorld > "tm scale: (tm width / self width min: tm height / self > height) asFloat."]! ! > > !PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 07:47'! > installAsActiveSubprojectIn: enclosingWorld titled: aString > > | opt newWidth | > > opt := self optimumExtentFromAuthor. > (opt x > (enclosingWorld width * 0.7) or: > [opt y > (enclosingWorld height * 0.7)]) ifTrue: [ > newWidth := enclosingWorld width // 2. > opt := newWidth @ (opt y * newWidth / opt x) truncated > ]. > ^self > installAsActiveSubprojectIn: enclosingWorld > at: (enclosingWorld topLeft + (enclosingWorld extent - opt // > 2) extent: opt) > titled: aString! ! > > > !Project methodsFor: 'enter' stamp: 'raa 11/14/2017 06:45'! > 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"! ! > > > !ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:46'! > enterAsActiveSubproject > "Enter my project." > > project class == DiskProxy > ifTrue: > ["When target is not in yet" > > [self enterWhenNotPresent "will bring it in"] on: > ProjectEntryNotification > do: [:ex | ^ex projectToEnter > enterAsActiveSubprojectWithin: self world]. > project class == DiskProxy ifTrue: [self error: 'Could not > find view']]. > (owner isSystemWindow) ifTrue: [project setViewSize: self extent]. > self showMouseState: 3. > project enterAsActiveSubprojectWithin: self world! ! > > !ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:43'! > showMenuForProjectView > | menu | > (menu := MenuMorph new) > add: 'enter this project' translated > action: [^ self enter]; > > add: 'ENTER ACTIVE' translated > action: [self setProperty: #wasOpenedAsSubproject toValue: true. > ^ self enterAsActiveSubproject]; > > add: 'PUBLISH (also saves a local copy)' translated > action: [^ project storeOnServerShowProgressOn: self forgetURL: false]; > > add: 'PUBLISH to a different server' translated > action: [project forgetExistingURL. > ^ project storeOnServerShowProgressOn: self forgetURL: true]; > > add: 'see if server version is more recent' translated > action: [^ self checkForNewerVersionAndLoad]; > > addLine; > add: 'expunge this project' translated > action: [^ self expungeProject]. > > menu title: ('Project Named \"{1}"' translated withCRs format: {project name}). > menu invokeModal.! ! > > Project removeSelector: #installAsActiveSubprojectIn:titled:! > > On 11/15/17, David T. Lewis <[hidden email]> wrote: > > I hope someone can take a look at Bob's change set. I'm going to be away for > > a day or two and I'm out of time for playing with Squeak, but this is > > certainly > > on my personal to-do list when I get back :-) > > > > Dave > > > > > > On Tue, Nov 14, 2017 at 08:14:07AM -0500, Bob Arning wrote: > >> Here is a start (squeak 5.1). Not extensively tested, but a FileList in > >> a world in the World was operational. > >> > >> > >> On 11/14/17 5:13 AM, H. Hirzel wrote: > >> >And it would be good to get "worlds in worlds" working again. > > > > > > > > > |
I did encounter an emergency evaluator after
posting the first code. My fix for that one is attached. On 11/15/17 8:29 PM, David T. Lewis
wrote:
Bob's changes are in the inbox as System-dtl.977 and Morphic-dtl.1365. Try the ENTER ACTIVE menu selection in a project view morph to test. It is quite easy to find your way to an emergency evaluator, so I put in into inbox rather than trunk for the time being. Dave On Wed, Nov 15, 2017 at 03:39:49PM +0100, H. Hirzel wrote:Bob's changes involve 4 methods PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld at: newBounds titled: aString PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld titled: aString Project>>enterAsActiveSubprojectWithin: enclosingWorld ProjectViewMorph>>enterAsActiveSubproject BTW this involves the mysterious 'AlignmentMorphBob1'..... Hannes Here is the code (unpacked fixProjectView.14Nov0811.cs.gz) to make it easier for people to have a look at it. '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 "! !PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 07:47'! installAsActiveSubprojectIn: enclosingWorld at: newBounds titled: aString | window howToOpen tm boundsForWorld | howToOpen := self embeddedProjectDisplayMode. "#scaled may be the only one that works at the moment" submorphs do: [:ss | ss owner isNil ifTrue: [ss privateOwner: self]]. "Transcript that was in outPointers and then got deleted." boundsForWorld := howToOpen == #naked ifTrue: [newBounds] ifFalse: [bounds]. worldState canvas: nil. worldState viewBox: boundsForWorld. self bounds: boundsForWorld. "self viewBox: Display boundingBox." "worldState handsDo: [:h | h initForEvents]." self installFlaps. "SystemWindow noteTopWindowIn: self." "self displayWorldSafely." howToOpen == #naked ifTrue: [enclosingWorld addMorphFront: self]. howToOpen == #window ifTrue: [window := (SystemWindow labelled: aString) model: self. window addMorph: self frame: (0 @ 0 extent: 1.0 @ 1.0). window openInWorld: enclosingWorld]. howToOpen == #frame ifTrue: [window := (AlignmentMorphBob1 new) minWidth: 100; minHeight: 100; borderWidth: 8; borderColor: Color green; bounds: newBounds. window addMorph: self. window openInWorld: enclosingWorld]. howToOpen == #scaled ifTrue: [self position: 0 @ 0. window := (EmbeddedWorldBorderMorph new) minWidth: 100; minHeight: 100; borderWidth: 8; borderColor: Color green; bounds: newBounds. tm := BOBTransformationMorph new. window addMorph: tm. tm addMorph: self. window openInWorld: enclosingWorld. tm changeWorldBoundsToShow: bounds. self arrangeToStartSteppingIn: enclosingWorld "tm scale: (tm width / self width min: tm height / self height) asFloat."]! ! !PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 07:47'! installAsActiveSubprojectIn: enclosingWorld titled: aString | opt newWidth | opt := self optimumExtentFromAuthor. (opt x > (enclosingWorld width * 0.7) or: [opt y > (enclosingWorld height * 0.7)]) ifTrue: [ newWidth := enclosingWorld width // 2. opt := newWidth @ (opt y * newWidth / opt x) truncated ]. ^self installAsActiveSubprojectIn: enclosingWorld at: (enclosingWorld topLeft + (enclosingWorld extent - opt // 2) extent: opt) titled: aString! ! !Project methodsFor: 'enter' stamp: 'raa 11/14/2017 06:45'! 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"! ! !ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:46'! enterAsActiveSubproject "Enter my project." project class == DiskProxy ifTrue: ["When target is not in yet" [self enterWhenNotPresent "will bring it in"] on: ProjectEntryNotification do: [:ex | ^ex projectToEnter enterAsActiveSubprojectWithin: self world]. project class == DiskProxy ifTrue: [self error: 'Could not find view']]. (owner isSystemWindow) ifTrue: [project setViewSize: self extent]. self showMouseState: 3. project enterAsActiveSubprojectWithin: self world! ! !ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:43'! showMenuForProjectView | menu | (menu := MenuMorph new) add: 'enter this project' translated action: [^ self enter]; add: 'ENTER ACTIVE' translated action: [self setProperty: #wasOpenedAsSubproject toValue: true. ^ self enterAsActiveSubproject]; add: 'PUBLISH (also saves a local copy)' translated action: [^ project storeOnServerShowProgressOn: self forgetURL: false]; add: 'PUBLISH to a different server' translated action: [project forgetExistingURL. ^ project storeOnServerShowProgressOn: self forgetURL: true]; add: 'see if server version is more recent' translated action: [^ self checkForNewerVersionAndLoad]; addLine; add: 'expunge this project' translated action: [^ self expungeProject]. menu title: ('Project Named \"{1}"' translated withCRs format: {project name}). menu invokeModal.! ! Project removeSelector: #installAsActiveSubprojectIn:titled:! On 11/15/17, David T. Lewis [hidden email] wrote:I hope someone can take a look at Bob's change set. I'm going to be away for a day or two and I'm out of time for playing with Squeak, but this is certainly on my personal to-do list when I get back :-) Dave On Tue, Nov 14, 2017 at 08:14:07AM -0500, Bob Arning wrote:Here is a start (squeak 5.1). Not extensively tested, but a FileList in a world in the World was operational. On 11/14/17 5:13 AM, H. Hirzel wrote:And it would be good to get "worlds in worlds" working again. WorldState-displayWorldsubmorphs.st (2K) Download Attachment |
Thanks, the emergency evaluator is gone.
I added this to inbox, then moved all your updates to trunk. There will be other issues to sort out, but there is no point in letting this sit in the inbox. Thanks! One thing I see is that moving a window (e.g. a browser) within the WiW that I open (ENTER ACTIVE menu selection) results in that window being resized to the wrong geometry. Probably it is being sized according to the proportions of the inner world relative to the outer world. Hopefully it is not one of the bugs that I just introduced in the last two days. Dave On Wed, Nov 15, 2017 at 08:40:28PM -0500, Bob Arning wrote: > I did encounter an emergency evaluator after posting the first code. My > fix for that one is attached. > > > On 11/15/17 8:29 PM, David T. Lewis wrote: > >Bob's changes are in the inbox as System-dtl.977 and Morphic-dtl.1365. > > > >Try the ENTER ACTIVE menu selection in a project view morph to test. > > > >It is quite easy to find your way to an emergency evaluator, so I put > >in into inbox rather than trunk for the time being. > > > >Dave > > > > > >On Wed, Nov 15, 2017 at 03:39:49PM +0100, H. Hirzel wrote: > >>Bob's changes involve 4 methods > >> > >>PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld at: > >>newBounds titled: aString > >>PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld titled: aString > >>Project>>enterAsActiveSubprojectWithin: enclosingWorld > >>ProjectViewMorph>>enterAsActiveSubproject > >> > >> > >>BTW this involves the mysterious 'AlignmentMorphBob1'..... > >> > >>Hannes > >> > >> > >> > >>Here is the code (unpacked fixProjectView.14Nov0811.cs.gz) to make it > >>easier for people to have a look at it. > >> > >> > >> > >>'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 "! > >> > >> > >>!PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 07:47'! > >>installAsActiveSubprojectIn: enclosingWorld at: newBounds titled: aString > >> | window howToOpen tm boundsForWorld | > >> howToOpen := self embeddedProjectDisplayMode. > >> "#scaled may be the only one that works at the moment" > >> submorphs do: [:ss | ss owner isNil ifTrue: [ss privateOwner: self]]. > >> "Transcript that was in outPointers and then got deleted." > >> boundsForWorld := howToOpen == #naked ifTrue: [newBounds] ifFalse: > >> [bounds]. > >> worldState canvas: nil. > >> worldState viewBox: boundsForWorld. > >> self bounds: boundsForWorld. > >> > >> "self viewBox: Display boundingBox." > >> "worldState handsDo: [:h | h initForEvents]." > >> self installFlaps. > >> > >> "SystemWindow noteTopWindowIn: self." > >> "self displayWorldSafely." > >> howToOpen == #naked ifTrue: [enclosingWorld addMorphFront: self]. > >> howToOpen == #window > >> ifTrue: > >> [window := (SystemWindow labelled: aString) model: self. > >> window addMorph: self frame: (0 @ 0 extent: 1.0 @ 1.0). > >> window openInWorld: enclosingWorld]. > >> howToOpen == #frame > >> ifTrue: > >> [window := (AlignmentMorphBob1 new) > >> minWidth: 100; > >> minHeight: 100; > >> borderWidth: 8; > >> borderColor: Color green; > >> bounds: newBounds. > >> window addMorph: self. > >> window openInWorld: enclosingWorld]. > >> howToOpen == #scaled > >> ifTrue: > >> [self position: 0 @ 0. > >> window := (EmbeddedWorldBorderMorph new) > >> minWidth: 100; > >> minHeight: 100; > >> borderWidth: 8; > >> borderColor: Color green; > >> bounds: newBounds. > >> tm := BOBTransformationMorph new. > >> window addMorph: tm. > >> tm addMorph: self. > >> window openInWorld: enclosingWorld. > >> tm changeWorldBoundsToShow: bounds. > >> self arrangeToStartSteppingIn: enclosingWorld > >> "tm scale: (tm width / self width min: tm height / self > >>height) asFloat."]! ! > >> > >>!PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 07:47'! > >>installAsActiveSubprojectIn: enclosingWorld titled: aString > >> > >> | opt newWidth | > >> > >> opt := self optimumExtentFromAuthor. > >> (opt x > (enclosingWorld width * 0.7) or: > >> [opt y > (enclosingWorld height * 0.7)]) ifTrue: [ > >> newWidth := enclosingWorld width // 2. > >> opt := newWidth @ (opt y * newWidth / opt x) truncated > >> ]. > >> ^self > >> installAsActiveSubprojectIn: enclosingWorld > >> at: (enclosingWorld topLeft + (enclosingWorld extent - opt // > >>2) extent: opt) > >> titled: aString! ! > >> > >> > >>!Project methodsFor: 'enter' stamp: 'raa 11/14/2017 06:45'! > >>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"! ! > >> > >> > >>!ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:46'! > >>enterAsActiveSubproject > >> "Enter my project." > >> > >> project class == DiskProxy > >> ifTrue: > >> ["When target is not in yet" > >> > >> [self enterWhenNotPresent "will bring it in"] on: > >>ProjectEntryNotification > >> do: [:ex | ^ex projectToEnter > >>enterAsActiveSubprojectWithin: self world]. > >> project class == DiskProxy ifTrue: [self error: 'Could not > >>find view']]. > >> (owner isSystemWindow) ifTrue: [project setViewSize: self extent]. > >> self showMouseState: 3. > >> project enterAsActiveSubprojectWithin: self world! ! > >> > >>!ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:43'! > >>showMenuForProjectView > >> | menu | > >> (menu := MenuMorph new) > >> add: 'enter this project' translated > >> action: [^ self enter]; > >> > >> add: 'ENTER ACTIVE' translated > >> action: [self setProperty: #wasOpenedAsSubproject toValue: > >> true. > >> ^ self enterAsActiveSubproject]; > >> > >> add: 'PUBLISH (also saves a local copy)' translated > >> action: [^ project storeOnServerShowProgressOn: self > >> forgetURL: false]; > >> > >> add: 'PUBLISH to a different server' translated > >> action: [project forgetExistingURL. > >> ^ project storeOnServerShowProgressOn: self > >> forgetURL: true]; > >> > >> add: 'see if server version is more recent' translated > >> action: [^ self checkForNewerVersionAndLoad]; > >> > >> addLine; > >> add: 'expunge this project' translated > >> action: [^ self expungeProject]. > >> > >> menu title: ('Project Named \"{1}"' translated withCRs format: > >> {project name}). > >> menu invokeModal.! ! > >> > >>Project removeSelector: #installAsActiveSubprojectIn:titled:! > >> > >>On 11/15/17, David T. Lewis <[hidden email]> wrote: > >>>I hope someone can take a look at Bob's change set. I'm going to be away > >>>for > >>>a day or two and I'm out of time for playing with Squeak, but this is > >>>certainly > >>>on my personal to-do list when I get back :-) > >>> > >>>Dave > >>> > >>> > >>>On Tue, Nov 14, 2017 at 08:14:07AM -0500, Bob Arning wrote: > >>>>Here is a start (squeak 5.1). Not extensively tested, but a FileList in > >>>>a world in the World was operational. > >>>> > >>>> > >>>>On 11/14/17 5:13 AM, H. Hirzel wrote: > >>>>>And it would be good to get "worlds in worlds" working again. > >>> > >>> > >>> > > 'From Squeak5.1 of 23 August 2016 [latest update: #16548] on 15 November 2017 at 8:39 pm'! !WorldState methodsFor: 'update cycle' stamp: 'raa 11/14/2017 11:21'! displayWorld: aWorld submorphs: submorphs "Update this world's display." | deferredUpdateMode handsToDraw allDamage handDamageRects worldDamageRects | submorphs do: [:m | m fullBounds]. "force re-layout if needed" self checkIfUpdateNeeded ifFalse: [^ self]. "display is already up-to-date" deferredUpdateMode := self doDeferredUpdatingFor: aWorld. deferredUpdateMode ifFalse: [self assuredCanvas]. worldDamageRects := self drawWorld: aWorld submorphs: submorphs invalidAreasOn: self assuredCanvas. "repair world's damage on canvas" "self handsDo:[:h| h noticeDamageRects: worldDamageRects]." handsToDraw := self selectHandsToDrawForDamage: worldDamageRects. handDamageRects := handsToDraw collect: [:h | h savePatchFrom: canvas]. allDamage := worldDamageRects, handDamageRects. handsToDraw reverseDo: [:h | canvas fullDrawMorph: h]. "draw hands onto world canvas" "*make this true to flash damaged areas for testing*" Preferences debugShowDamage ifTrue: [aWorld flashRects: allDamage color: Color black]. canvas finish: allDamage. "quickly copy altered rects of canvas to Display:" deferredUpdateMode ifTrue: [self forceDamageToScreen: allDamage] ifFalse: [canvas showAt: aWorld viewBox origin invalidRects: allDamage]. handsToDraw do: [:h | h restoreSavedPatchOn: canvas]. "restore world canvas under hands" Display deferUpdates: false; forceDisplayUpdate. ! ! > |
It certainly is nice to be able to rotate the world 30 degrees off its axis
and still have it remain functional. Screen shot attached. Dave On Wed, Nov 15, 2017 at 09:31:44PM -0500, David T. Lewis wrote: > Thanks, the emergency evaluator is gone. > > I added this to inbox, then moved all your updates to trunk. There will be > other issues to sort out, but there is no point in letting this sit in the > inbox. Thanks! > > One thing I see is that moving a window (e.g. a browser) within the WiW that > I open (ENTER ACTIVE menu selection) results in that window being resized to > the wrong geometry. Probably it is being sized according to the proportions > of the inner world relative to the outer world. Hopefully it is not one of > the bugs that I just introduced in the last two days. > > Dave > > > On Wed, Nov 15, 2017 at 08:40:28PM -0500, Bob Arning wrote: > > I did encounter an emergency evaluator after posting the first code. My > > fix for that one is attached. > > > > > > On 11/15/17 8:29 PM, David T. Lewis wrote: > > >Bob's changes are in the inbox as System-dtl.977 and Morphic-dtl.1365. > > > > > >Try the ENTER ACTIVE menu selection in a project view morph to test. > > > > > >It is quite easy to find your way to an emergency evaluator, so I put > > >in into inbox rather than trunk for the time being. > > > > > >Dave > > > > > > > > >On Wed, Nov 15, 2017 at 03:39:49PM +0100, H. Hirzel wrote: > > >>Bob's changes involve 4 methods > > >> > > >>PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld at: > > >>newBounds titled: aString > > >>PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld titled: aString > > >>Project>>enterAsActiveSubprojectWithin: enclosingWorld > > >>ProjectViewMorph>>enterAsActiveSubproject > > >> > > >> > > >>BTW this involves the mysterious 'AlignmentMorphBob1'..... > > >> > > >>Hannes > > >> > > >> > > >> > > >>Here is the code (unpacked fixProjectView.14Nov0811.cs.gz) to make it > > >>easier for people to have a look at it. > > >> > > >> > > >> > > >>'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 "! > > >> > > >> > > >>!PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 07:47'! > > >>installAsActiveSubprojectIn: enclosingWorld at: newBounds titled: aString > > >> | window howToOpen tm boundsForWorld | > > >> howToOpen := self embeddedProjectDisplayMode. > > >> "#scaled may be the only one that works at the moment" > > >> submorphs do: [:ss | ss owner isNil ifTrue: [ss privateOwner: self]]. > > >> "Transcript that was in outPointers and then got deleted." > > >> boundsForWorld := howToOpen == #naked ifTrue: [newBounds] ifFalse: > > >> [bounds]. > > >> worldState canvas: nil. > > >> worldState viewBox: boundsForWorld. > > >> self bounds: boundsForWorld. > > >> > > >> "self viewBox: Display boundingBox." > > >> "worldState handsDo: [:h | h initForEvents]." > > >> self installFlaps. > > >> > > >> "SystemWindow noteTopWindowIn: self." > > >> "self displayWorldSafely." > > >> howToOpen == #naked ifTrue: [enclosingWorld addMorphFront: self]. > > >> howToOpen == #window > > >> ifTrue: > > >> [window := (SystemWindow labelled: aString) model: self. > > >> window addMorph: self frame: (0 @ 0 extent: 1.0 @ 1.0). > > >> window openInWorld: enclosingWorld]. > > >> howToOpen == #frame > > >> ifTrue: > > >> [window := (AlignmentMorphBob1 new) > > >> minWidth: 100; > > >> minHeight: 100; > > >> borderWidth: 8; > > >> borderColor: Color green; > > >> bounds: newBounds. > > >> window addMorph: self. > > >> window openInWorld: enclosingWorld]. > > >> howToOpen == #scaled > > >> ifTrue: > > >> [self position: 0 @ 0. > > >> window := (EmbeddedWorldBorderMorph new) > > >> minWidth: 100; > > >> minHeight: 100; > > >> borderWidth: 8; > > >> borderColor: Color green; > > >> bounds: newBounds. > > >> tm := BOBTransformationMorph new. > > >> window addMorph: tm. > > >> tm addMorph: self. > > >> window openInWorld: enclosingWorld. > > >> tm changeWorldBoundsToShow: bounds. > > >> self arrangeToStartSteppingIn: enclosingWorld > > >> "tm scale: (tm width / self width min: tm height / self > > >>height) asFloat."]! ! > > >> > > >>!PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 07:47'! > > >>installAsActiveSubprojectIn: enclosingWorld titled: aString > > >> > > >> | opt newWidth | > > >> > > >> opt := self optimumExtentFromAuthor. > > >> (opt x > (enclosingWorld width * 0.7) or: > > >> [opt y > (enclosingWorld height * 0.7)]) ifTrue: [ > > >> newWidth := enclosingWorld width // 2. > > >> opt := newWidth @ (opt y * newWidth / opt x) truncated > > >> ]. > > >> ^self > > >> installAsActiveSubprojectIn: enclosingWorld > > >> at: (enclosingWorld topLeft + (enclosingWorld extent - opt // > > >>2) extent: opt) > > >> titled: aString! ! > > >> > > >> > > >>!Project methodsFor: 'enter' stamp: 'raa 11/14/2017 06:45'! > > >>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"! ! > > >> > > >> > > >>!ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:46'! > > >>enterAsActiveSubproject > > >> "Enter my project." > > >> > > >> project class == DiskProxy > > >> ifTrue: > > >> ["When target is not in yet" > > >> > > >> [self enterWhenNotPresent "will bring it in"] on: > > >>ProjectEntryNotification > > >> do: [:ex | ^ex projectToEnter > > >>enterAsActiveSubprojectWithin: self world]. > > >> project class == DiskProxy ifTrue: [self error: 'Could not > > >>find view']]. > > >> (owner isSystemWindow) ifTrue: [project setViewSize: self extent]. > > >> self showMouseState: 3. > > >> project enterAsActiveSubprojectWithin: self world! ! > > >> > > >>!ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:43'! > > >>showMenuForProjectView > > >> | menu | > > >> (menu := MenuMorph new) > > >> add: 'enter this project' translated > > >> action: [^ self enter]; > > >> > > >> add: 'ENTER ACTIVE' translated > > >> action: [self setProperty: #wasOpenedAsSubproject toValue: > > >> true. > > >> ^ self enterAsActiveSubproject]; > > >> > > >> add: 'PUBLISH (also saves a local copy)' translated > > >> action: [^ project storeOnServerShowProgressOn: self > > >> forgetURL: false]; > > >> > > >> add: 'PUBLISH to a different server' translated > > >> action: [project forgetExistingURL. > > >> ^ project storeOnServerShowProgressOn: self > > >> forgetURL: true]; > > >> > > >> add: 'see if server version is more recent' translated > > >> action: [^ self checkForNewerVersionAndLoad]; > > >> > > >> addLine; > > >> add: 'expunge this project' translated > > >> action: [^ self expungeProject]. > > >> > > >> menu title: ('Project Named \"{1}"' translated withCRs format: > > >> {project name}). > > >> menu invokeModal.! ! > > >> > > >>Project removeSelector: #installAsActiveSubprojectIn:titled:! > > >> > > >>On 11/15/17, David T. Lewis <[hidden email]> wrote: > > >>>I hope someone can take a look at Bob's change set. I'm going to be away > > >>>for > > >>>a day or two and I'm out of time for playing with Squeak, but this is > > >>>certainly > > >>>on my personal to-do list when I get back :-) > > >>> > > >>>Dave > > >>> > > >>> > > >>>On Tue, Nov 14, 2017 at 08:14:07AM -0500, Bob Arning wrote: > > >>>>Here is a start (squeak 5.1). Not extensively tested, but a FileList in > > >>>>a world in the World was operational. > > >>>> > > >>>> > > >>>>On 11/14/17 5:13 AM, H. Hirzel wrote: > > >>>>>And it would be good to get "worlds in worlds" working again. > > >>> > > >>> > > >>> > > > > > 'From Squeak5.1 of 23 August 2016 [latest update: #16548] on 15 November 2017 at 8:39 pm'! !WorldState methodsFor: 'update cycle' stamp: 'raa 11/14/2017 11:21'! displayWorld: aWorld submorphs: submorphs "Update this world's display." | deferredUpdateMode handsToDraw allDamage handDamageRects worldDamageRects | submorphs do: [:m | m fullBounds]. "force re-layout if needed" self checkIfUpdateNeeded ifFalse: [^ self]. "display is already up-to-date" deferredUpdateMode := self doDeferredUpdatingFor: aWorld. deferredUpdateMode ifFalse: [self assuredCanvas]. worldDamageRects := self drawWorld: aWorld submorphs: submorphs invalidAreasOn: self assuredCanvas. "repair world's damage on canvas" "self handsDo:[:h| h noticeDamageRects: worldDamageRects]." handsToDraw := self selectHandsToDrawForDamage: worldDamageRects. handDamageRects := handsToDraw collect: [:h | h savePatchFrom: canvas]. allDamage := worldDamageRects, handDamageRects. handsToDraw reverseDo: [:h | canvas fullDrawMorph: h]. "draw hands onto world canvas" "*make this true to flash damaged areas for testing*" Preferences debugShowDamage ifTrue: [aWorld flashRects: allDamage color: Color black]. canvas finish: allDamage. "quickly copy altered rects of canvas to Display:" deferredUpdateMode ifTrue: [self forceDamageToScreen: allDamage] ifFalse: [canvas showAt: aWorld viewBox origin invalidRects: allDamage]. handsToDraw do: [:h | h restoreSavedPatchOn: canvas]. "restore world canvas under hands" Display deferUpdates: false; forceDisplayUpdate. ! ! > > > > world.png (593K) Download Attachment |
Nice.
Note the small coloured rectangles in the upper right corner of the 'EmbeddedWorldBorder'. Blue (expand or reduce) and white (enter project completely) work fine. For yellow, red and cyan I could not figure out what they are supposed to do. --Hannes On 11/16/17, David T. Lewis <[hidden email]> wrote: > It certainly is nice to be able to rotate the world 30 degrees off its axis > and still have it remain functional. Screen shot attached. > > Dave > > > On Wed, Nov 15, 2017 at 09:31:44PM -0500, David T. Lewis wrote: >> Thanks, the emergency evaluator is gone. >> >> I added this to inbox, then moved all your updates to trunk. There will >> be >> other issues to sort out, but there is no point in letting this sit in >> the >> inbox. Thanks! >> >> One thing I see is that moving a window (e.g. a browser) within the WiW >> that >> I open (ENTER ACTIVE menu selection) results in that window being resized >> to >> the wrong geometry. Probably it is being sized according to the >> proportions >> of the inner world relative to the outer world. Hopefully it is not one >> of >> the bugs that I just introduced in the last two days. >> >> Dave >> >> >> On Wed, Nov 15, 2017 at 08:40:28PM -0500, Bob Arning wrote: >> > I did encounter an emergency evaluator after posting the first code. My >> > >> > fix for that one is attached. >> > >> > >> > On 11/15/17 8:29 PM, David T. Lewis wrote: >> > >Bob's changes are in the inbox as System-dtl.977 and Morphic-dtl.1365. >> > > >> > >Try the ENTER ACTIVE menu selection in a project view morph to test. >> > > >> > >It is quite easy to find your way to an emergency evaluator, so I put >> > >in into inbox rather than trunk for the time being. >> > > >> > >Dave >> > > >> > > >> > >On Wed, Nov 15, 2017 at 03:39:49PM +0100, H. Hirzel wrote: >> > >>Bob's changes involve 4 methods >> > >> >> > >>PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld at: >> > >>newBounds titled: aString >> > >>PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld titled: >> > >> aString >> > >>Project>>enterAsActiveSubprojectWithin: enclosingWorld >> > >>ProjectViewMorph>>enterAsActiveSubproject >> > >> >> > >> >> > >>BTW this involves the mysterious 'AlignmentMorphBob1'..... >> > >> >> > >>Hannes >> > >> >> > >> >> > >> >> > >>Here is the code (unpacked fixProjectView.14Nov0811.cs.gz) to make it >> > >>easier for people to have a look at it. >> > >> >> > >> >> > >> >> > >>'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 "! >> > >> >> > >> >> > >>!PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 >> > >> 07:47'! >> > >>installAsActiveSubprojectIn: enclosingWorld at: newBounds titled: >> > >> aString >> > >> | window howToOpen tm boundsForWorld | >> > >> howToOpen := self embeddedProjectDisplayMode. >> > >> "#scaled may be the only one that works at the moment" >> > >> submorphs do: [:ss | ss owner isNil ifTrue: [ss privateOwner: >> > >> self]]. >> > >> "Transcript that was in outPointers and then got deleted." >> > >> boundsForWorld := howToOpen == #naked ifTrue: [newBounds] >> > >> ifFalse: >> > >> [bounds]. >> > >> worldState canvas: nil. >> > >> worldState viewBox: boundsForWorld. >> > >> self bounds: boundsForWorld. >> > >> >> > >> "self viewBox: Display boundingBox." >> > >> "worldState handsDo: [:h | h initForEvents]." >> > >> self installFlaps. >> > >> >> > >> "SystemWindow noteTopWindowIn: self." >> > >> "self displayWorldSafely." >> > >> howToOpen == #naked ifTrue: [enclosingWorld addMorphFront: >> > >> self]. >> > >> howToOpen == #window >> > >> ifTrue: >> > >> [window := (SystemWindow labelled: aString) model: self. >> > >> window addMorph: self frame: (0 @ 0 extent: 1.0 @ 1.0). >> > >> window openInWorld: enclosingWorld]. >> > >> howToOpen == #frame >> > >> ifTrue: >> > >> [window := (AlignmentMorphBob1 new) >> > >> minWidth: 100; >> > >> minHeight: 100; >> > >> borderWidth: 8; >> > >> borderColor: Color green; >> > >> bounds: newBounds. >> > >> window addMorph: self. >> > >> window openInWorld: enclosingWorld]. >> > >> howToOpen == #scaled >> > >> ifTrue: >> > >> [self position: 0 @ 0. >> > >> window := (EmbeddedWorldBorderMorph new) >> > >> minWidth: 100; >> > >> minHeight: 100; >> > >> borderWidth: 8; >> > >> borderColor: Color green; >> > >> bounds: newBounds. >> > >> tm := BOBTransformationMorph new. >> > >> window addMorph: tm. >> > >> tm addMorph: self. >> > >> window openInWorld: enclosingWorld. >> > >> tm changeWorldBoundsToShow: bounds. >> > >> self arrangeToStartSteppingIn: enclosingWorld >> > >> "tm scale: (tm width / self width min: tm height / self >> > >>height) asFloat."]! ! >> > >> >> > >>!PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 >> > >> 07:47'! >> > >>installAsActiveSubprojectIn: enclosingWorld titled: aString >> > >> >> > >> | opt newWidth | >> > >> >> > >> opt := self optimumExtentFromAuthor. >> > >> (opt x > (enclosingWorld width * 0.7) or: >> > >> [opt y > (enclosingWorld height * 0.7)]) ifTrue: [ >> > >> newWidth := enclosingWorld width // 2. >> > >> opt := newWidth @ (opt y * newWidth / opt x) truncated >> > >> ]. >> > >> ^self >> > >> installAsActiveSubprojectIn: enclosingWorld >> > >> at: (enclosingWorld topLeft + (enclosingWorld extent - opt >> > >> // >> > >>2) extent: opt) >> > >> titled: aString! ! >> > >> >> > >> >> > >>!Project methodsFor: 'enter' stamp: 'raa 11/14/2017 06:45'! >> > >>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"! ! >> > >> >> > >> >> > >>!ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:46'! >> > >>enterAsActiveSubproject >> > >> "Enter my project." >> > >> >> > >> project class == DiskProxy >> > >> ifTrue: >> > >> ["When target is not in yet" >> > >> >> > >> [self enterWhenNotPresent "will bring it in"] on: >> > >>ProjectEntryNotification >> > >> do: [:ex | ^ex projectToEnter >> > >>enterAsActiveSubprojectWithin: self world]. >> > >> project class == DiskProxy ifTrue: [self error: 'Could >> > >> not >> > >>find view']]. >> > >> (owner isSystemWindow) ifTrue: [project setViewSize: self >> > >> extent]. >> > >> self showMouseState: 3. >> > >> project enterAsActiveSubprojectWithin: self world! ! >> > >> >> > >>!ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:43'! >> > >>showMenuForProjectView >> > >> | menu | >> > >> (menu := MenuMorph new) >> > >> add: 'enter this project' translated >> > >> action: [^ self enter]; >> > >> >> > >> add: 'ENTER ACTIVE' translated >> > >> action: [self setProperty: #wasOpenedAsSubproject toValue: >> > >> true. >> > >> ^ self enterAsActiveSubproject]; >> > >> >> > >> add: 'PUBLISH (also saves a local copy)' translated >> > >> action: [^ project storeOnServerShowProgressOn: self >> > >> forgetURL: false]; >> > >> >> > >> add: 'PUBLISH to a different server' translated >> > >> action: [project forgetExistingURL. >> > >> ^ project storeOnServerShowProgressOn: self >> > >> forgetURL: true]; >> > >> >> > >> add: 'see if server version is more recent' translated >> > >> action: [^ self checkForNewerVersionAndLoad]; >> > >> >> > >> addLine; >> > >> add: 'expunge this project' translated >> > >> action: [^ self expungeProject]. >> > >> >> > >> menu title: ('Project Named \"{1}"' translated withCRs format: >> > >> {project name}). >> > >> menu invokeModal.! ! >> > >> >> > >>Project removeSelector: #installAsActiveSubprojectIn:titled:! >> > >> >> > >>On 11/15/17, David T. Lewis <[hidden email]> wrote: >> > >>>I hope someone can take a look at Bob's change set. I'm going to be >> > >>> away >> > >>>for >> > >>>a day or two and I'm out of time for playing with Squeak, but this >> > >>> is >> > >>>certainly >> > >>>on my personal to-do list when I get back :-) >> > >>> >> > >>>Dave >> > >>> >> > >>> >> > >>>On Tue, Nov 14, 2017 at 08:14:07AM -0500, Bob Arning wrote: >> > >>>>Here is a start (squeak 5.1). Not extensively tested, but a FileList >> > >>>> in >> > >>>>a world in the World was operational. >> > >>>> >> > >>>> >> > >>>>On 11/14/17 5:13 AM, H. Hirzel wrote: >> > >>>>>And it would be good to get "worlds in worlds" working again. >> > >>> >> > >>> >> > >>> >> > >> >> > 'From Squeak5.1 of 23 August 2016 [latest update: #16548] on 15 November >> > 2017 at 8:39 pm'! !WorldState methodsFor: 'update cycle' stamp: 'raa >> > 11/14/2017 11:21'! displayWorld: aWorld submorphs: submorphs "Update >> > this world's display." | deferredUpdateMode handsToDraw allDamage >> > handDamageRects worldDamageRects | submorphs do: [:m | m fullBounds]. >> > "force re-layout if needed" self checkIfUpdateNeeded ifFalse: [^ self]. >> > "display is already up-to-date" deferredUpdateMode := self >> > doDeferredUpdatingFor: aWorld. deferredUpdateMode ifFalse: [self >> > assuredCanvas]. worldDamageRects := self drawWorld: aWorld submorphs: >> > submorphs invalidAreasOn: self assuredCanvas. "repair world's damage on >> > canvas" "self handsDo:[:h| h noticeDamageRects: >> > worldDamageRects]." handsToDraw := self selectHandsToDrawForDamage: >> > worldDamageRects. handDamageRects := handsToDraw collect: [:h | h >> > savePatchFrom: canvas]. allDamage := worldDamageRects, >> > handDamageRects. handsToDraw reverseDo: [:h | canvas fullDrawMorph: >> > h]. "draw hands onto world canvas" "*make this true to flash damaged >> > areas for testing*" Preferences debugShowDamage ifTrue: [aWorld >> > flashRects: allDamage color: Color black]. canvas finish: >> > allDamage. "quickly copy altered rects of canvas to >> > Display:" deferredUpdateMode ifTrue: [self forceDamageToScreen: >> > allDamage] ifFalse: [canvas showAt: aWorld viewBox origin >> > invalidRects: allDamage]. handsToDraw do: [:h | h restoreSavedPatchOn: >> > canvas]. "restore world canvas under hands" Display deferUpdates: >> > false; forceDisplayUpdate. ! ! >> > >> >> > |
These are to allow showing only part of a project. If, e.g., you wrote a game in Etoys, the game itself might be the app view while the scripts and other assets you used in building it might be the factory view. These views are defined here:
On 11/16/17 12:16 AM, H. Hirzel wrote:
For yellow, red and cyan I could not figure out what they are supposed to do. |
In reply to this post by David T. Lewis
> On 15-11-2017, at 6:45 PM, David T. Lewis <[hidden email]> wrote: > > It certainly is nice to be able to rotate the world 30 degrees off its axis > and still have it remain functional. Indeed - you have no idea how often I’ve longed for this… tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Useful Latin Phrases:- Illiud Latine dici non potest = You can't say that in Latin. |
On 11/16/17, tim Rowledge <[hidden email]> wrote:
> >> On 15-11-2017, at 6:45 PM, David T. Lewis <[hidden email]> wrote: >> >> It certainly is nice to be able to rotate the world 30 degrees off its >> axis >> and still have it remain functional. > > Indeed - you have no idea how often I’ve longed for this… > > > tim ... The most useful feature is that you can easily move objects in and out of the subproject to the parent project. --Hannes |
On Sat, Nov 25, 2017 at 04:09:12PM +0100, H. Hirzel wrote:
> On 11/16/17, tim Rowledge <[hidden email]> wrote: > > > >> On 15-11-2017, at 6:45 PM, David T. Lewis <[hidden email]> wrote: > >> > >> It certainly is nice to be able to rotate the world 30 degrees off its > >> axis > >> and still have it remain functional. > > > > Indeed - you have no idea how often I???ve longed for this??? > > > > > > tim > > ... The most useful feature is that you can easily move objects in > and out of the subproject to the parent project. > But something is wrong with the way this is working. The symptoms are that if I do ENTER ACTIVE to activate the project morph as a world-in-world, and then move or resize windows within that activated world, the geometry is all wrong, and it seems to be derived from the geometry of the main world (for the full display). When the mouse pointer moves over the activated world-in-world, is it the case that the current project, world, and hand should be changed to that of the world-in-world? That is not happening, and I suspect it is at the root of the geometry problem. I am guessing that there needs to be some hook to update the current project to that of the world-in-world project whenever the mouse pointer is over that project. I know that I am not saying this very clearly but maybe it will trigger an idea from someone who is familiar with this. Dave |
If what you are seeing is bad behavior when
moving a SystemWindow, but reasonable behavior when moving an
ordinary Morph, then the answer might lie in SystemWindow>>justDroppedInto:event:.
The initial focus for world-in-world was not really SystemWindows,
but the kind of things one would see in Etoys. On 11/25/17 11:08 AM, David T. Lewis
wrote:
On Sat, Nov 25, 2017 at 04:09:12PM +0100, H. Hirzel wrote:On 11/16/17, tim Rowledge [hidden email] wrote:On 15-11-2017, at 6:45 PM, David T. Lewis [hidden email] wrote: It certainly is nice to be able to rotate the world 30 degrees off its axis and still have it remain functional.Indeed - you have no idea how often I???ve longed for this??? tim... The most useful feature is that you can easily move objects in and out of the subproject to the parent project.But something is wrong with the way this is working. The symptoms are that if I do ENTER ACTIVE to activate the project morph as a world-in-world, and then move or resize windows within that activated world, the geometry is all wrong, and it seems to be derived from the geometry of the main world (for the full display). When the mouse pointer moves over the activated world-in-world, is it the case that the current project, world, and hand should be changed to that of the world-in-world? That is not happening, and I suspect it is at the root of the geometry problem. I am guessing that there needs to be some hook to update the current project to that of the world-in-world project whenever the mouse pointer is over that project. I know that I am not saying this very clearly but maybe it will trigger an idea from someone who is familiar with this. Dave |
In reply to this post by Hannes Hirzel
> On 25-11-2017, at 7:09 AM, H. Hirzel <[hidden email]> wrote: > > ... The most useful feature is that you can easily move objects in > and out of the subproject to the parent project. … except I haven’t made any noticeable use of projects in decades. The only reason I ever used to use them was to have separate changesets for different bits of work and and as soon as there were multiple changesets available with a tool to manipulate them I dropped Projects completely. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Debugger: A tool that substitutes afterthought for forethought. |
In reply to this post by Bob Arning-2
Thanks Bob,
Indeed that is exactly what I'm seeing. SystemWindows have the problem, and ordinary morphs do not. Thanks for the tip. Dave On Sat, Nov 25, 2017 at 01:29:33PM -0500, Bob Arning wrote: > If what you are seeing is bad behavior when moving a SystemWindow, but > reasonable behavior when moving an ordinary Morph, then the answer might > lie in SystemWindow>>justDroppedInto:event:. The initial focus for > world-in-world was not really SystemWindows, but the kind of things one > would see in Etoys. > > > On 11/25/17 11:08 AM, David T. Lewis wrote: > >On Sat, Nov 25, 2017 at 04:09:12PM +0100, H. Hirzel wrote: > >>On 11/16/17, tim Rowledge <[hidden email]> wrote: > >>>>On 15-11-2017, at 6:45 PM, David T. Lewis <[hidden email]> wrote: > >>>> > >>>>It certainly is nice to be able to rotate the world 30 degrees off its > >>>>axis > >>>>and still have it remain functional. > >>>Indeed - you have no idea how often I???ve longed for this??? > >>> > >>> > >>>tim > >>... The most useful feature is that you can easily move objects in > >>and out of the subproject to the parent project. > >> > >But something is wrong with the way this is working. The symptoms are > >that if I do ENTER ACTIVE to activate the project morph as a > >world-in-world, > >and then move or resize windows within that activated world, the geometry > >is all wrong, and it seems to be derived from the geometry of the main > >world > >(for the full display). > > > >When the mouse pointer moves over the activated world-in-world, is it > >the case that the current project, world, and hand should be changed > >to that of the world-in-world? That is not happening, and I suspect it > >is at the root of the geometry problem. > > > >I am guessing that there needs to be some hook to update the current > >project to that of the world-in-world project whenever the mouse pointer > >is over that project. > > > >I know that I am not saying this very clearly but maybe it will trigger > >an idea from someone who is familiar with this. > > > >Dave > > > > > > |
In reply to this post by timrowledge
On Sat, Nov 25, 2017 at 10:36:49AM -0800, tim Rowledge wrote:
> > > On 25-11-2017, at 7:09 AM, H. Hirzel <[hidden email]> wrote: > > > > ... The most useful feature is that you can easily move objects in > > and out of the subproject to the parent project. > > ??? except I haven???t made any noticeable use of projects in decades. The only reason I ever used to use them was to have separate changesets for different bits of work and and as soon as there were multiple changesets available with a tool to manipulate them I dropped Projects completely. > > Really? I am surprised to hear that. I like to try to work with a single image as much as possible, and to organize things I am working in in different projects and sub-projects, in much the same way that I organize things into different directories on Linux or Windows. I will usually keep several workspaces open in any given project with notes and reminders that let me go back to something I was working on a few month ago, and remember where I left off. Of course I also keep different images for various reasons, but overall I find that organizing things with projects within an image is a very natural way to work. Dave |
Me too.
And there is lot of non code stuff (drawings) I keep. Often I have projects x and x-explanations. Herbert Am 25.11.2017 um 20:33 schrieb David T. Lewis: > On Sat, Nov 25, 2017 at 10:36:49AM -0800, tim Rowledge wrote: >>> On 25-11-2017, at 7:09 AM, H. Hirzel <[hidden email]> wrote: >>> >>> ... The most useful feature is that you can easily move objects in >>> and out of the subproject to the parent project. >> ??? except I haven???t made any noticeable use of projects in decades. The only reason I ever used to use them was to have separate changesets for different bits of work and and as soon as there were multiple changesets available with a tool to manipulate them I dropped Projects completely. >> >> > Really? I am surprised to hear that. > > I like to try to work with a single image as much as possible, and to > organize things I am working in in different projects and sub-projects, > in much the same way that I organize things into different directories > on Linux or Windows. I will usually keep several workspaces open in any > given project with notes and reminders that let me go back to something > I was working on a few month ago, and remember where I left off. > > Of course I also keep different images for various reasons, but overall > I find that organizing things with projects within an image is a very > natural way to work. > > Dave > > > |
In reply to this post by David T. Lewis
> Of course I also keep different images for various reasons, but overall
> I find that organizing things with projects within an image is a very > natural way to work. Same here. Stef |
In reply to this post by timrowledge
On Sunday 26 November 2017 12:06 AM, tim Rowledge wrote:
>> On 25-11-2017, at 7:09 AM, H. Hirzel<[hidden email]> >> wrote: >> >> ... The most useful feature is that you can easily move objects >> in and out of the subproject to the parent project. > … except I haven’t made any noticeable use of projects in decades. > The only reason I ever used to use them was to have separate > changesets for different bits of work and and as soon as there were > multiple changesets available with a tool to manipulate them I > dropped Projects completely. whiteboarding an idea within a Morphic world. See attached picture for example. Each investigation or exploration goes into a separate Project. If I am interrupted in the middle of an investigation, I just open up another project, clarify the idea and then resume my original project. I have faced issues (nothing serious) while moving projects from one image to another or from one VM to another. I also have to keep deleting projects because having too many active slows my session but that is understandable given my RAM constraints. Regards .. Subbu squeak-projects.png (104K) Download Attachment |
In reply to this post by Hannes Hirzel
Hi Hannes-- > I was wondering as well are there cases where > > ActiveWorld == World > > does not hold. This happens often in my SqueakJS work in web browsers, when I'm using Morphic in "host windows" mode (each Morphic window has its own Morphic world, with a separate HTML5 canvas). It's important that any debuggers invoked by a single-window ActiveWorld get opened in the multi-window World. thanks, -C -- Craig Latta Black Page Digital Amsterdam :: San Francisco [hidden email] +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) |
In reply to this post by David T. Lewis
> On Nov 15, 2017, at 6:45 PM, David T. Lewis <[hidden email]> wrote: > > It certainly is nice to be able to rotate the world 30 degrees off its axis > and still have it remain functional. Screen shot attached. Cool! Looks like the VMSimulator except it's got a different border and its way faster :-) Any chance we can write tests for the world-in-world plus event delivery scenario? At Cadence my boss Yaron pushed us to write tests for the line-oriented JavaScript debugger we had to implement, where the debugger window was open; i.e. it tested the GUI as well as internals. They have been worth their weight in gold in keepers by the system stable even though writing the framework for them was quite difficult. > > Dave > > >> On Wed, Nov 15, 2017 at 09:31:44PM -0500, David T. Lewis wrote: >> Thanks, the emergency evaluator is gone. >> >> I added this to inbox, then moved all your updates to trunk. There will be >> other issues to sort out, but there is no point in letting this sit in the >> inbox. Thanks! >> >> One thing I see is that moving a window (e.g. a browser) within the WiW that >> I open (ENTER ACTIVE menu selection) results in that window being resized to >> the wrong geometry. Probably it is being sized according to the proportions >> of the inner world relative to the outer world. Hopefully it is not one of >> the bugs that I just introduced in the last two days. >> >> Dave >> >> >>> On Wed, Nov 15, 2017 at 08:40:28PM -0500, Bob Arning wrote: >>> I did encounter an emergency evaluator after posting the first code. My >>> fix for that one is attached. >>> >>> >>>> On 11/15/17 8:29 PM, David T. Lewis wrote: >>>> Bob's changes are in the inbox as System-dtl.977 and Morphic-dtl.1365. >>>> >>>> Try the ENTER ACTIVE menu selection in a project view morph to test. >>>> >>>> It is quite easy to find your way to an emergency evaluator, so I put >>>> in into inbox rather than trunk for the time being. >>>> >>>> Dave >>>> >>>> >>>>> On Wed, Nov 15, 2017 at 03:39:49PM +0100, H. Hirzel wrote: >>>>> Bob's changes involve 4 methods >>>>> >>>>> PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld at: >>>>> newBounds titled: aString >>>>> PasteUpMorph>>installAsActiveSubprojectIn: enclosingWorld titled: aString >>>>> Project>>enterAsActiveSubprojectWithin: enclosingWorld >>>>> ProjectViewMorph>>enterAsActiveSubproject >>>>> >>>>> >>>>> BTW this involves the mysterious 'AlignmentMorphBob1'..... >>>>> >>>>> Hannes >>>>> >>>>> >>>>> >>>>> Here is the code (unpacked fixProjectView.14Nov0811.cs.gz) to make it >>>>> easier for people to have a look at it. >>>>> >>>>> >>>>> >>>>> '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 "! >>>>> >>>>> >>>>> !PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 07:47'! >>>>> installAsActiveSubprojectIn: enclosingWorld at: newBounds titled: aString >>>>> | window howToOpen tm boundsForWorld | >>>>> howToOpen := self embeddedProjectDisplayMode. >>>>> "#scaled may be the only one that works at the moment" >>>>> submorphs do: [:ss | ss owner isNil ifTrue: [ss privateOwner: self]]. >>>>> "Transcript that was in outPointers and then got deleted." >>>>> boundsForWorld := howToOpen == #naked ifTrue: [newBounds] ifFalse: >>>>> [bounds]. >>>>> worldState canvas: nil. >>>>> worldState viewBox: boundsForWorld. >>>>> self bounds: boundsForWorld. >>>>> >>>>> "self viewBox: Display boundingBox." >>>>> "worldState handsDo: [:h | h initForEvents]." >>>>> self installFlaps. >>>>> >>>>> "SystemWindow noteTopWindowIn: self." >>>>> "self displayWorldSafely." >>>>> howToOpen == #naked ifTrue: [enclosingWorld addMorphFront: self]. >>>>> howToOpen == #window >>>>> ifTrue: >>>>> [window := (SystemWindow labelled: aString) model: self. >>>>> window addMorph: self frame: (0 @ 0 extent: 1.0 @ 1.0). >>>>> window openInWorld: enclosingWorld]. >>>>> howToOpen == #frame >>>>> ifTrue: >>>>> [window := (AlignmentMorphBob1 new) >>>>> minWidth: 100; >>>>> minHeight: 100; >>>>> borderWidth: 8; >>>>> borderColor: Color green; >>>>> bounds: newBounds. >>>>> window addMorph: self. >>>>> window openInWorld: enclosingWorld]. >>>>> howToOpen == #scaled >>>>> ifTrue: >>>>> [self position: 0 @ 0. >>>>> window := (EmbeddedWorldBorderMorph new) >>>>> minWidth: 100; >>>>> minHeight: 100; >>>>> borderWidth: 8; >>>>> borderColor: Color green; >>>>> bounds: newBounds. >>>>> tm := BOBTransformationMorph new. >>>>> window addMorph: tm. >>>>> tm addMorph: self. >>>>> window openInWorld: enclosingWorld. >>>>> tm changeWorldBoundsToShow: bounds. >>>>> self arrangeToStartSteppingIn: enclosingWorld >>>>> "tm scale: (tm width / self width min: tm height / self >>>>> height) asFloat."]! ! >>>>> >>>>> !PasteUpMorph methodsFor: 'WiW support' stamp: 'raa 11/14/2017 07:47'! >>>>> installAsActiveSubprojectIn: enclosingWorld titled: aString >>>>> >>>>> | opt newWidth | >>>>> >>>>> opt := self optimumExtentFromAuthor. >>>>> (opt x > (enclosingWorld width * 0.7) or: >>>>> [opt y > (enclosingWorld height * 0.7)]) ifTrue: [ >>>>> newWidth := enclosingWorld width // 2. >>>>> opt := newWidth @ (opt y * newWidth / opt x) truncated >>>>> ]. >>>>> ^self >>>>> installAsActiveSubprojectIn: enclosingWorld >>>>> at: (enclosingWorld topLeft + (enclosingWorld extent - opt // >>>>> 2) extent: opt) >>>>> titled: aString! ! >>>>> >>>>> >>>>> !Project methodsFor: 'enter' stamp: 'raa 11/14/2017 06:45'! >>>>> 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"! ! >>>>> >>>>> >>>>> !ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:46'! >>>>> enterAsActiveSubproject >>>>> "Enter my project." >>>>> >>>>> project class == DiskProxy >>>>> ifTrue: >>>>> ["When target is not in yet" >>>>> >>>>> [self enterWhenNotPresent "will bring it in"] on: >>>>> ProjectEntryNotification >>>>> do: [:ex | ^ex projectToEnter >>>>> enterAsActiveSubprojectWithin: self world]. >>>>> project class == DiskProxy ifTrue: [self error: 'Could not >>>>> find view']]. >>>>> (owner isSystemWindow) ifTrue: [project setViewSize: self extent]. >>>>> self showMouseState: 3. >>>>> project enterAsActiveSubprojectWithin: self world! ! >>>>> >>>>> !ProjectViewMorph methodsFor: 'events' stamp: 'raa 11/14/2017 06:43'! >>>>> showMenuForProjectView >>>>> | menu | >>>>> (menu := MenuMorph new) >>>>> add: 'enter this project' translated >>>>> action: [^ self enter]; >>>>> >>>>> add: 'ENTER ACTIVE' translated >>>>> action: [self setProperty: #wasOpenedAsSubproject toValue: >>>>> true. >>>>> ^ self enterAsActiveSubproject]; >>>>> >>>>> add: 'PUBLISH (also saves a local copy)' translated >>>>> action: [^ project storeOnServerShowProgressOn: self >>>>> forgetURL: false]; >>>>> >>>>> add: 'PUBLISH to a different server' translated >>>>> action: [project forgetExistingURL. >>>>> ^ project storeOnServerShowProgressOn: self >>>>> forgetURL: true]; >>>>> >>>>> add: 'see if server version is more recent' translated >>>>> action: [^ self checkForNewerVersionAndLoad]; >>>>> >>>>> addLine; >>>>> add: 'expunge this project' translated >>>>> action: [^ self expungeProject]. >>>>> >>>>> menu title: ('Project Named \"{1}"' translated withCRs format: >>>>> {project name}). >>>>> menu invokeModal.! ! >>>>> >>>>> Project removeSelector: #installAsActiveSubprojectIn:titled:! >>>>> >>>>>> On 11/15/17, David T. Lewis <[hidden email]> wrote: >>>>>> I hope someone can take a look at Bob's change set. I'm going to be away >>>>>> for >>>>>> a day or two and I'm out of time for playing with Squeak, but this is >>>>>> certainly >>>>>> on my personal to-do list when I get back :-) >>>>>> >>>>>> Dave >>>>>> >>>>>> >>>>>>> On Tue, Nov 14, 2017 at 08:14:07AM -0500, Bob Arning wrote: >>>>>>> Here is a start (squeak 5.1). Not extensively tested, but a FileList in >>>>>>> a world in the World was operational. >>>>>>> >>>>>>> >>>>>>>> On 11/14/17 5:13 AM, H. Hirzel wrote: >>>>>>>> And it would be good to get "worlds in worlds" working again. >>>>>> >>>>>> >>>>>> >>> >> >>> 'From Squeak5.1 of 23 August 2016 [latest update: #16548] on 15 November 2017 at 8:39 pm'! > > !WorldState methodsFor: 'update cycle' stamp: 'raa 11/14/2017 11:21'! > displayWorld: aWorld submorphs: submorphs > "Update this world's display." > > | deferredUpdateMode handsToDraw allDamage handDamageRects worldDamageRects | > > submorphs do: [:m | m fullBounds]. "force re-layout if needed" > self checkIfUpdateNeeded ifFalse: [^ self]. "display is already up-to-date" > > deferredUpdateMode := self doDeferredUpdatingFor: aWorld. > deferredUpdateMode ifFalse: [self assuredCanvas]. > > worldDamageRects := self drawWorld: aWorld submorphs: submorphs invalidAreasOn: self assuredCanvas. "repair world's damage on canvas" > "self handsDo:[:h| h noticeDamageRects: worldDamageRects]." > handsToDraw := self selectHandsToDrawForDamage: worldDamageRects. > handDamageRects := handsToDraw collect: [:h | h savePatchFrom: canvas]. > allDamage := worldDamageRects, handDamageRects. > > handsToDraw reverseDo: [:h | canvas fullDrawMorph: h]. "draw hands onto world canvas" > > "*make this true to flash damaged areas for testing*" > Preferences debugShowDamage ifTrue: [aWorld flashRects: allDamage color: Color black]. > > canvas finish: allDamage. > > "quickly copy altered rects of canvas to Display:" > deferredUpdateMode > ifTrue: [self forceDamageToScreen: allDamage] > ifFalse: [canvas showAt: aWorld viewBox origin invalidRects: allDamage]. > handsToDraw do: [:h | h restoreSavedPatchOn: canvas]. "restore world canvas under hands" > Display deferUpdates: false; forceDisplayUpdate. > ! ! >>> >> >> > <world.png> > |
In reply to this post by timrowledge
Hi Tim,
> On Nov 25, 2017, at 10:36 AM, tim Rowledge <[hidden email]> wrote: > > >> On 25-11-2017, at 7:09 AM, H. Hirzel <[hidden email]> wrote: >> >> ... The most useful feature is that you can easily move objects in >> and out of the subproject to the parent project. > > … except I haven’t made any noticeable use of projects in decades. The only reason I ever used to use them was to have separate changesets for different bits of work and and as soon as there were multiple changesets available with a tool to manipulate them I dropped Projects completely. When working on the VM I find it useful to use different projects for different activities such as a project each for JIT, FFI, Slang, etc. Sometimes they overlap but often they're sufficiently discrete and there's so much code to interact with that keeping my things separate is key to a day not spent merely digging for windows hidden behind other windows... > > > tim > -- > tim Rowledge; [hidden email]; http://www.rowledge.org/tim > Debugger: A tool that substitutes afterthought for forethought. > > > |
Free forum by Nabble | Edit this page |