[squeak-dev] The Trunk: Morphic-ar.198.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Oct 5 06:03:20 UTC 2009


Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.198.mcz

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

Name: Morphic-ar.198
Author: ar
Time: 4 October 2009, 11:01:57 am
UUID: 4d6d4394-6f89-be49-901e-3d4e745f2f2c
Ancestors: Morphic-ar.197

Removes some more MVC dependencies from FileList and replaces them with proper Toolbuilder variants.

=============== Diff against Morphic-ar.197 ===============

Item was changed:
  ----- Method: FileList class>>openEditorOn:editString: (in category 'instance creation') -----
  openEditorOn: aFileStream editString: editString
  	"Open an editor on the given FileStream."
+ 	| fileModel topView builder |
- 
- 	| fileModel topView fileContentsView |
- 	Smalltalk isMorphic ifTrue: [^ (self openMorphOn: aFileStream editString: editString) openInWorld].
- 
  	fileModel := FileList new setFileStream: aFileStream.	"closes the stream"
+ 	builder := ToolBuilder default.
+ 	topView := fileModel buildEditorWith: builder.
+ 	^builder open: topView.!
- 	topView := StandardSystemView new.
- 	topView
- 		model: fileModel;
- 		label: aFileStream fullName;
- 		minimumSize: 180 at 120.
- 	topView borderWidth: 1.
- 
- 	fileContentsView := PluggableTextView on: fileModel 
- 		text: #contents accept: #put:
- 		readSelection: #contentsSelection menu: #fileContentsMenu:shifted:.
- 	fileContentsView window: (0 at 0 extent: 180 at 120).
- 	topView addSubView: fileContentsView.
- 	editString ifNotNil: [fileContentsView editString: editString.
- 			fileContentsView hasUnacceptedEdits: true].
- 
- 	topView controller open.
- !

Item was changed:
  ----- Method: FileList>>labelString (in category 'initialization') -----
  labelString
+ 	^fileName ifNil:['File List'] ifNotNil:[directory fullNameFor: fileName].!
- 	^'File List'!

Item was added:
+ ----- Method: FileList>>buildCodePaneWith: (in category 'toolbuilder') -----
+ buildCodePaneWith: builder
+ 	| textSpec |
+ 	textSpec := builder pluggableTextSpec new.
+ 	textSpec 
+ 		model: self;
+ 		getText: #contents; 
+ 		setText: #put:; 
+ 		selection: #contentsSelection; 
+ 		menu: #fileContentsMenu:shifted:.
+ 	^textSpec!

Item was added:
+ ----- Method: FileList>>buildEditorWith: (in category 'toolbuilder') -----
+ buildEditorWith: builder
+ 	^super buildWith: builder!

Item was removed:
- ----- Method: FileList class>>openMorphOn:editString: (in category 'instance creation') -----
- openMorphOn: aFileStream editString: editString 
- 	"Open a morphic view of a FileList on the given file."
- 	| fileModel window fileContentsView |
- 
- 	fileModel := FileList new setFileStream: aFileStream.	"closes the stream"
- 	window := (SystemWindow labelled: aFileStream fullName) model: fileModel.
- 
- 	window addMorph: (fileContentsView := PluggableTextMorph on: fileModel 
- 			text: #contents accept: #put:
- 			readSelection: #contentsSelection 
- 			menu: #fileContentsMenu:shifted:)
- 		frame: (0 at 0 corner: 1 at 1).
- 	editString ifNotNil: [fileContentsView editString: editString.
- 			fileContentsView hasUnacceptedEdits: true].
- 
- 	^ window!




More information about the Squeak-dev mailing list