[squeak-dev] The Trunk: System-mt.1101.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Sep 25 08:39:13 UTC 2019


Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1101.mcz

==================== Summary ====================

Name: System-mt.1101
Author: mt
Time: 25 September 2019, 10:39:08.307838 am
UUID: c829ba68-0ccb-d34e-aa5a-9a8fe3496e25
Ancestors: System-mt.1100

Fixes #beTopProject, but disconnects visual project-viewer hierarchy from actual project tree. As backup project, avoid cycling between two broken project kinds but only follow project parents.

=============== Diff against System-mt.1100 ===============

Item was changed:
  ----- Method: Project class>>tryOtherProjectForRecovery: (in category 'error recovery') -----
  tryOtherProjectForRecovery: errorMessage
  	"Try entering the parent project if it uses a different user interface. We determine this by comparing the project's class."
  	
  	| safeProject nextProject |
  	nextProject := Project current.
  	safeProject := nil.
  	"Search parent projects for one of a different type"
  	[safeProject notNil or: [nextProject isTopProject]] whileFalse: [
  		nextProject := nextProject parent.
  		(Project current isKindOf: nextProject class)
  			ifFalse: [safeProject := nextProject]].
+ 		
+ 	"September 2019 --- Do not cycle between Morphic and MVC if both break."
  	"No suitable parent project found, search all projects for any one of different type."
+ 	"safeProject ifNil: [Smalltalk garbageCollect.
- 	safeProject ifNil: [Smalltalk garbageCollect.
  		safeProject := Project allSubInstances
+ 			detect: [:proj | (proj isKindOf: Project current class) not] ifNone: []]."
+ 		
- 			detect: [:proj | (proj isKindOf: Project current class) not] ifNone: []].
  	safeProject ifNotNil: [:p | 
  		p enterForEmergencyRecovery.
  		"Active process will usually suspend after this."].
  !

Item was changed:
  ----- Method: Project>>beTopProject (in category 'sub-projects & hierarchy') -----
  beTopProject
  
+ 	| previousTop |
  	self isTopProject ifTrue: [^ self].
  	
+ 	previousTop := self class topProject.
+ 	
  	self parent deletingProject: self. "Just remove views and refs to me."
+ 	self addProject: previousTop. "The current top project will be my child now."
+ 	self setParent: self. "I am the new top project."!
- 	self addProject: self class topProject.
- 	self setParent: self.!

Item was changed:
  ----- Method: Project>>setParent: (in category 'sub-projects & hierarchy') -----
  setParent: newParent
  
- 	"Notify the current parent to discard views and other references. Avoids deleting that project later if the former parent is deleted. You can only have one parent anyway.."
- 	(self parent isKindOf: Project) ifTrue: [
- 		self parent ~= newParent ifTrue: [self parent deletingProject: self].
- 	].
- 
  	parentProject := newParent.
  	nextProject := previousProject := nil.!



More information about the Squeak-dev mailing list