The Inbox: System-dtl.983.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.983.mcz

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

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

Name: System-dtl.983
Author: dtl
Time: 10 December 2017, 1:54:57.456518 pm
UUID: 0df950ab-8484-4d7e-bf0a-09d5450b3a0b
Ancestors: System-dtl.982

Fix logic for project selection in #tryOtherProjectForRecovery:

=============== Diff against System-dtl.982 ===============

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.
  [safeProject notNil or: [nextProject isTopProject]] whileFalse: [
  nextProject := nextProject parent.
  (Project current isKindOf: nextProject class)
  ifFalse: [safeProject := nextProject]].
 
  "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 ifNil: [
- Smalltalk garbageCollect.
  safeProject := Project allSubInstances
+ detect: [:proj | (proj isKindOf: Project current class) not
+ and: [proj class ~= Project]]
+ ifNone: []].
- detect: [ :proj | proj class ~= Project
- or: [ (proj isKindOf: Project current class) not ] ]
- ifNone: [ nil ] ].
-
  safeProject ifNotNil: [:p |
  p enterForEmergencyRecovery.
  "Active process will usually suspend after this."].!