The Trunk: EToys-eem.304.mcz

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

The Trunk: EToys-eem.304.mcz

commits-2
Eliot Miranda uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-eem.304.mcz

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

Name: EToys-eem.304
Author: eem
Time: 12 July 2017, 10:09:25.400282 am
UUID: ae9828e4-4a18-4fb5-ad3f-027689693cfa
Ancestors: EToys-eem.303

Make allExtantPlayers robust in the presence of a newly instantiated EtoysPresenter, which is something that happens during project loading.  With this change I can now load saved projects.

=============== Diff against EToys-eem.303 ===============

Item was changed:
  ----- Method: EtoysPresenter>>allExtantPlayers (in category 'intialize') -----
  allExtantPlayers
  "The initial intent here was to produce a list of Player objects associated with any Morph in the tree beneath the receiver's associatedMorph.  whether it is the submorph tree or perhaps off on unseen bookPages.  We have for the moment moved away from that initial intent, and in the current version we only deliver up players associated with the submorph tree only.  <-- this note dates from 4/21/99
 
  Call #flushPlayerListCache; to force recomputation."
 
  | fullList |
  playerList ifNotNil:
  [^ playerList].
+ associatedMorph ifNil:
+ [^ #()].
 
  fullList := associatedMorph allMorphs select:
  [:m | m player ~~ nil] thenCollect: [:m | m player].
  fullList copy do:
  [:aPlayer |
  aPlayer class scripts do:
  [:aScript |  aScript isTextuallyCoded ifFalse:
  [aScript currentScriptEditor ifNotNil: [:ed |
  | objectsReferredToByTiles |
  objectsReferredToByTiles := ed allMorphs
  select:
  [:aMorph | (aMorph isKindOf: TileMorph) and: [aMorph type == #objRef]]
  thenCollect:
  [:aMorph | aMorph actualObject].
  fullList addAll: objectsReferredToByTiles]]]].
 
  ^ playerList := fullList asSet asArray sort:
  [:a :b | a externalName < b externalName]!