[squeak-dev] The Trunk: ToolBuilder-Morphic-cwp.83.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 3 00:00:46 UTC 2012


Colin Putney uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-cwp.83.mcz

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

Name: ToolBuilder-Morphic-cwp.83
Author: cwp
Time: 22 November 2011, 9:22:53.997 pm
UUID: a68565e9-cad9-439f-a9fb-85c5f168cd74
Ancestors: ToolBuilder-Morphic-cmm.82

Extended PluggableTextMorphPlus to support a getMenuSelector with 3 arguments. The third argument, if present, will be the current selection interval.

=============== Diff against ToolBuilder-Morphic-cmm.82 ===============

Item was added:
+ ----- Method: PluggableTextMorphPlus>>getMenu: (in category 'menu') -----
+ getMenu: shiftKeyState
+ 	"Answer the menu for this text view. We override the superclass implementation to
+ 	so we can give the selection interval to the model."
+ 	
+ 	| menu aMenu |
+ 	getMenuSelector == nil ifTrue: [^ nil].
+ 	getMenuSelector numArgs < 3 ifTrue: [^ super getMenu: shiftKeyState].
+ 	menu := MenuMorph new defaultTarget: model.
+ 	getMenuSelector numArgs = 3 ifTrue:
+ 		[aMenu := model 
+ 			perform: getMenuSelector 
+ 			with: menu 
+ 			with: shiftKeyState 
+ 			with: self selectionInterval.
+ 		getMenuTitleSelector ifNotNil: 
+ 			[aMenu addTitle: (model perform: getMenuTitleSelector)].
+ 		^ aMenu].
+ 	^ self error: 'The getMenuSelector must be a 1- or 2 or 3-keyword symbol'!



More information about the Squeak-dev mailing list