[squeak-dev] The Trunk: Tools-mt.895.mcz

David T. Lewis lewis at mail.msen.com
Thu Oct 3 11:52:56 UTC 2019


On Thu, Sep 26, 2019 at 05:37:46PM +0200, Tobias Pape wrote:
> 
> > On 26.09.2019, at 17:31, commits at source.squeak.org wrote:
> > 
> > Marcel Taeumel uploaded a new version of Tools to project The Trunk:
> > http://source.squeak.org/trunk/Tools-mt.895.mcz
> > 
> > ==================== Summary ====================
> > 
> > Name: Tools-mt.895
> > Author: mt
> > Time: 26 September 2019, 5:31:06.240419 pm
> > UUID: 8a9fb174-09f8-894c-8c5f-35a10699d7ec
> > Ancestors: Tools-mt.894
> > 
> > In debuggers, use same kind of "add protocol" as in code browsers.
> > 
> > =============== Diff against Tools-mt.894 ===============
> > 
> > Item was changed:
> >  ----- Method: Debugger>>askForCategoryIn:default: (in category 'notifier support') -----
> >  askForCategoryIn: aClass default: aString
> > + 
> > + 	^ (Project uiManager
> > + 		chooseFromOrAddTo: (aClass allMethodCategoriesIntegratedThrough: Object)
> > + 		lines: #()
> > + 		title: 'Please provide a good category for the new method' translated)
> > + 			ifNil: [aString]
> > + 			ifNotNil: [:newCategory | newCategory ifEmpty: [aString]]!
> > - 	| categories index category |
> > - 	categories := OrderedCollection with: 'new ...'. 
> > - 	categories addAll: (aClass allMethodCategoriesIntegratedThrough: Object).	
> > - 	index := UIManager default  
> > - 				chooseFrom: categories
> > - 				title: 'Please provide a good category for the new method!!' translated.
> > - 	index = 0 ifTrue: [^ aString].
> > - 	category := index = 1 ifTrue: [UIManager default request: 'Enter category name:']
> > - 						ifFalse: [categories at: index].
> > - 	^ category isEmpty ifTrue: [^ aString] ifFalse: [category]!
> > 
> 
> Aside: What is the preferred version to reach the ui manager? `UIManager default` or `Project uiManager` (I wasn't aware of the latter, btw.)
> 
> Best regards
> 	-Tobias
>

The two are equivalent, but the "Project uiManager" idiom should
be preferred because it communicates the relationship between a
project and its UI manager.

The "UIManager default" idiom is widely used in the image, but mainly
in methods with older time stamps.

Dave
 


More information about the Squeak-dev mailing list