[Pkg] The Trunk: Morphic-dtl.345.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Feb 15 03:17:50 UTC 2010


David T. Lewis uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-dtl.345.mcz

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

Name: Morphic-dtl.345
Author: dtl
Time: 14 February 2010, 10:16:05.063 pm
UUID: 7ba66dd7-6dd5-4f8c-8518-c0685d8f5114
Ancestors: Morphic-cmm.344

Implement MorphicProject>>textWindows to remove MVC/Morphic dependencies from  Utilities class> storeTextWindowContentsToFileNamed:

=============== Diff against Morphic-cmm.344 ===============

Item was added:
+ ----- Method: MorphicProject>>textWindows (in category 'utilities') -----
+ textWindows
+ 	"Answer a dictionary of all system windows for text display keyed by window title.
+ 	Generate new window titles as required to ensure unique keys in the dictionary."
+ 
+ 	| aDict windows title |
+ 	aDict := Dictionary new.
+ 	windows := World submorphs select: [:m | m isSystemWindow].
+ 	windows do:
+ 		[:w | | assoc |
+ 		assoc := w titleAndPaneText.
+ 		assoc ifNotNil:
+ 			[w holdsTranscript ifFalse:
+ 				[title := assoc key.
+ 				(aDict includesKey: title) ifTrue: [ | newKey | "Ensure unique keys in aDict"
+ 					(1 to: 100) detect: [:e |
+ 							newKey := title, '-', e asString.
+ 							(aDict includesKey: newKey) not].
+ 					title := newKey.
+ 					assoc := newKey -> assoc value].
+ 				aDict add: assoc]]].
+ 	^ aDict
+ !



More information about the Packages mailing list