FW: [FIX] Re: [Modules] Closing project windows

Henrik Gedenryd h.gedenryd at open.ac.uk
Tue Mar 26 15:21:59 UTC 2002


Ok,

the fix has been confirmed so the lingering code has been removed. Note that
eToys haven't been converted to use modules yet, as far as I know.

Henrik




-------------- next part --------------
'From Squeak3.3alpha of 30 January 2002 [latest update: #4769] on 26 March 2002 at 9:17:11 am'!
"Change Set:		closingProjectFix
Date:			26 March 2002
Author:			Henrik Gedenryd

This makes Project windows closable. The Environments-related code has simply been removed."!


!ImageSegment methodsFor: 'read/write segment' stamp: 'hg 3/26/2002 09:15'!
rootsIncludingPlayers
	"Return a new roots array with more objects.  (Caller should store into rootArray.) Player (non-systemDefined) gets its class and metaclass put into the Roots array.  Then ask for the segment again."

	| extras havePresenter players morphs existing |
	userRootCnt ifNil: [userRootCnt _ arrayOfRoots size].
	extras _ OrderedCollection new.
	arrayOfRoots do: [:root | 
		(root isKindOf: Presenter) ifTrue: [havePresenter _ root].
		(root isKindOf: PasteUpMorph) ifTrue: [
				root isWorldMorph ifTrue: [havePresenter _ root presenter]].
		(root isKindOf: Project) ifTrue: [havePresenter _ root world presenter]].
	havePresenter ifNotNil: [
		havePresenter flushPlayerListCache.		"old and outside guys"
		morphs _ IdentitySet new: 400.
		havePresenter associatedMorph allMorphsAndBookPagesInto: morphs.
		players _ (morphs select: [:m | m player ~~ nil] 
					thenCollect: [:m | m player]) asArray.
		players _ players select: [:ap | (arrayOfRoots includes: ap class) not
			& (ap class isSystemDefined not)].
		extras addAll: (players collect: [:each | each class]).
		havePresenter world project module ifNil: [
			extras addAll: (players collect: [:each | each class class])].
		extras addAll: morphs.	"Make then ALL roots!!"
		].
	existing _ arrayOfRoots asIdentitySet.
	extras _ extras reject: [ :each | existing includes: each].
	extras isEmpty ifTrue: [^ nil].	"no change"
	havePresenter _ players _ morphs _ nil.
	^ arrayOfRoots, extras! !



More information about the Squeak-dev mailing list