[Pkg] The Trunk: ST80-dtl.92.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Feb 6 22:05:59 UTC 2010


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

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

Name: ST80-dtl.92
Author: dtl
Time: 6 February 2010, 5:05:29.21 pm
UUID: b52dae65-3353-4477-ad2e-34ffa9fc0a5a
Ancestors: ST80-nice.91

Add PluggableFileList>>mvcOpenLable:in: to remove explicit MVC dependency in PluggableFileList.

=============== Diff against ST80-nice.91 ===============

Item was added:
+ ----- Method: PluggableFileList>>mvcOpenLabel:in: (in category '*ST80-Pluggable Views') -----
+ mvcOpenLabel: ignored in: aWorld
+ 	"Open a view of an instance of me."
+ 	"PluggableFileList new open"
+ 	| topView volListView templateView fileListView fileStringView leftButtonView middleButtonView rightButtonView |
+ 	
+ 	self directory: directory.
+ 	topView := (PluggableFileListView new)
+ 		model: self.
+ 
+ 	volListView := PluggableListView on: self
+ 		list: #volumeList
+ 		selected: #volumeListIndex
+ 		changeSelected: #volumeListIndex:
+ 		menu: #volumeMenu:.
+ 	volListView autoDeselect: false.
+ 	volListView window: (0 at 0 extent: 80 at 45).
+ 	topView addSubView: volListView.
+ 
+ 	templateView := PluggableTextView on: self
+ 		text: #pattern
+ 		accept: #pattern:.
+ 	templateView askBeforeDiscardingEdits: false.
+ 	templateView window: (0 at 0 extent: 80 at 15).
+ 	topView addSubView: templateView below: volListView.
+ 
+ 	fileListView := PluggableListView on: self
+ 		list: #fileList
+ 		selected: #fileListIndex
+ 		changeSelected: #fileListIndex:
+ 		menu: #fileListMenu:.
+ 	fileListView window: (0 at 0 extent: 120 at 60).
+ 
+ 	topView addSubView: fileListView toRightOf: volListView.
+ 
+ 	fileListView controller terminateDuringSelect: true.  "Pane to left may change under scrollbar"
+ 
+ 	"fileStringView := PluggableTextView on: self
+ 		text: #fileString
+ 		accept: #fileString:.
+ 	fileStringView askBeforeDiscardingEdits: false.
+ 	fileStringView window: (0 at 0 extent: 200 at 15).
+ 	topView addSubView: fileStringView below: templateView."
+ 	fileStringView := templateView.
+ 
+ 
+ 	leftButtonView := PluggableButtonView 
+ 		on: self
+ 		getState: nil
+ 		action: #leftButtonPressed.
+ 	leftButtonView
+ 		label: 'Cancel';
+ 		backgroundColor: Color red;
+ 		borderWidth: 3;
+ 		window: (0 at 0 extent: 50 at 15).
+ 
+ 	middleButtonView := PluggableButtonView
+ 		on: self
+ 		getState: nil
+ 		action: nil.
+ 	middleButtonView
+ 		label: prompt;
+ 		window: (0 at 0 extent: 100 at 15);
+ 		borderWidth: 1;
+ 		controller: NoController new.
+ 
+ 	rightButtonView := PluggableButtonView
+ 		on: self
+ 		getState: nil
+ 		action: #rightButtonPressed.
+ 	rightButtonView
+ 		label: 'Accept';
+ 		backgroundColor: (self canAccept ifTrue: [Color green] ifFalse: [Color lightYellow]);
+ 		borderWidth: (self canAccept ifTrue: [3] ifFalse: [1]);
+ 		window: (0 at 0 extent: 50 at 15).
+ 	self canAccept ifFalse: [rightButtonView controller: NoController new].
+ 
+ 	topView acceptButtonView: rightButtonView.
+ 
+ 	topView
+ 		addSubView: leftButtonView below: fileStringView;
+ 		addSubView: middleButtonView toRightOf: leftButtonView;
+ 		addSubView: rightButtonView toRightOf: middleButtonView.
+ 
+ 	self changed: #getSelectionSel.
+ 	topView doModalDialog.
+ 	
+ 	^self result
+ !



More information about the Packages mailing list