The Trunk: Tools-mt.895.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-mt.895.mcz

commits-2
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]!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.895.mcz

Tobias Pape

> On 26.09.2019, at 17:31, [hidden email] 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

>



Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.895.mcz

David T. Lewis
On Thu, Sep 26, 2019 at 05:37:46PM +0200, Tobias Pape wrote:

>
> > On 26.09.2019, at 17:31, [hidden email] 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