[squeak-dev] The Trunk: ToolBuilder-MVC-ar.16.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 7 22:19:52 UTC 2009


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

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

Name: ToolBuilder-MVC-ar.16
Author: ar
Time: 7 September 2009, 3:19:42 am
UUID: e074cd6c-636c-8f40-8cb7-a8ff72cff81b
Ancestors: ToolBuilder-MVC-ar.15

Move the old TextStyle>>mvcPromptFor: implementation here.

=============== Diff against ToolBuilder-MVC-ar.15 ===============

Item was changed:
  ----- Method: MVCUIManager>>chooseFont:for:setSelector:getSelector: (in category 'ui requests') -----
+ chooseFont: aPrompt for: aTarget setSelector: setSelector getSelector: getSelector
+ 	"MVC Only!! prompt for a font and if one is provided, send it to aTarget using a message with selector aSelector."
+ 	| aMenu aChoice aStyle namesAndSizes aFont |
+ 	aMenu := CustomMenu new.
+ 	TextStyle actualTextStyles keysSortedSafely do:
+ 		[:styleName |
+ 			aMenu add: styleName action: styleName].
+ 	aChoice := aMenu startUpWithCaption: aPrompt.
+ 	aChoice ifNil: [^ self].
+ 	aMenu := CustomMenu new.
+ 	aStyle := TextStyle named: aChoice.
+ 	(namesAndSizes := aStyle fontNamesWithPointSizes) do:
+ 		[:aString | aMenu add: aString action: aString].
+ 	aChoice := aMenu startUpWithCaption: nil.
+ 	aChoice ifNil: [^ self].
+ 	aFont := aStyle fontAt: (namesAndSizes indexOf: aChoice).
+ 	aTarget perform: setSelector with: aFont!
- chooseFont: titleString for: aModel setSelector: setSelector getSelector: getSelector
- 	"Open a font-chooser for the given model"
- 	^TextStyle mvcPromptForFont: titleString andSendTo: aModel withSelector: setSelector!




More information about the Squeak-dev mailing list