The Inbox: System-dtl.984.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: System-dtl.984.mcz

commits-2
David T. Lewis uploaded a new version of System to project The Inbox:
http://source.squeak.org/inbox/System-dtl.984.mcz

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

Name: System-dtl.984
Author: dtl
Time: 12 December 2017, 10:17:36.2562 pm
UUID: 1c5f7c2c-7c54-4e4e-abf3-6d9c2e53206c
Ancestors: System-dtl.983

Simplify search for a suitable project in Project class>tryOtherProjectForRecovery:
The test for project class ~= Project is not needed because Project is abstract in practice.
Clean up comments.

=============== Diff against System-dtl.983 ===============

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]].
+ "No suitable parent project found, search all projects for any one of different type."
-
- "Parent project was not of a different type. Search through all known
- projects to find any one that is of different project type."
  safeProject ifNil: [Smalltalk garbageCollect.
  safeProject := Project allSubInstances
+ detect: [:proj | (proj isKindOf: Project current class) not] ifNone: []].
- detect: [:proj | (proj isKindOf: Project current class) not
- and: [proj class ~= Project]]
- ifNone: []].
  safeProject ifNotNil: [:p |
  p enterForEmergencyRecovery.
+ "Active process will usually suspend after this."].
+ !
- "Active process will usually suspend after this."].!