The Inbox: Protocols-fbs.30.mcz

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

The Inbox: Protocols-fbs.30.mcz

commits-2
A new version of Protocols was added to project The Inbox:
http://source.squeak.org/inbox/Protocols-fbs.30.mcz

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

Name: Protocols-fbs.30
Author: fbs
Time: 14 April 2010, 12:39:30.857 pm
UUID: 7fb9d193-fac2-f44e-a701-0bf76b787185
Ancestors: Protocols-fbs.29

This commit corrects the mistakes of Protocols-fbs.29. We now don't abuse optionalButtons, but instead always add the Lexicon's special buttons just above the code pane.

Lexicon thus now respects the #optionalButtons preference.

=============== Diff against Protocols-fbs.29 ===============

Item was added:
+ ----- Method: Lexicon>>listFrame:fromLeft:width: (in category 'initialization') -----
+ listFrame: bottomFraction fromLeft: leftFraction width: rightFraction
+ ^LayoutFrame new
+ leftFraction: leftFraction offset: 0;
+ topFraction: 0 offset: 0;
+ rightFraction: (leftFraction + rightFraction) offset: 0;
+ bottomFraction: bottomFraction offset: self buttonHeight negated - 3!

Item was changed:
  ----- Method: Lexicon>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
  "Create the ui for the browser"
  | windowSpec max |
  max := self wantsOptionalButtons ifTrue:[0.32] ifFalse:[0.4].
  windowSpec := self buildWindowWith: builder specs: {
+ (self listFrame: max fromLeft: 0 width: 0.5) -> [self buildCategoryListWith: builder].
+ (self listFrame: max fromLeft: 0.5 width: 0.5) -> [self buildMessageListWith: builder].
+ (self customButtonsFrame: max) -> [self buildCustomButtonsWith: builder].
- (0@0 corner: 0.5@max) -> [self buildCategoryListWith: builder].
- (0.5@0 corner: 1@max) -> [self buildMessageListWith: builder].
  (0@max corner: 1@1) -> [self buildCodePaneWith: builder].
  }.
  ^builder build: windowSpec!

Item was changed:
  ----- Method: Lexicon>>customButtonSpecs (in category 'control buttons') -----
  customButtonSpecs
  "Answer a triplet defining buttons, in the format:
 
  button label
  selector to send
  help message"
  | aa |
  aa := contentsSymbol == #tiles ifTrue: [{   "Consult Ted Kaehler regarding this bit"
  {'tiles'. #tilesMenu. 'tiles for assignment and constants'. true}.
  {'vars'. #varTilesMenu. 'tiles for instance variables and a new temporary'. true}
  }] ifFalse: [#()]. "true in 4th place means act on mouseDown"
 
+ ^ aa, #(
- ^ aa,
- {{(ScriptingSystem formAtKey: #TinyMenu) asMorph. #offerMenu. 'click here to get a menu with further options'}.
- {self limitClassString. #chooseLimitClass. 'Governs which classes'' methods should be shown.  If this is the same as the viewed class, then only methods implemented in that class will be shown.  If it is ProtoObject, then methods of all classes in the vocabulary will be shown.'.}.},
- #(
  ('follow' seeAlso 'view a method I implement that is called by this method')
  ('find' obtainNewSearchString 'find methods by name search')
  ('sent...' setSendersSearch 'view the methods I implement that send a given message')
 
  ('<' navigateToPreviousMethod 'view the previous active method')
  ('>' navigateToNextMethod 'view the next active method')
+ ('-' removeFromSelectorsVisited 'remove this method from my active list'))!
- ('-' removeFromSelectorsVisited 'remove this method from my active list')),
- {{(ScriptingSystem formAtKey: #Cat) asMorph. #showHomeCategory. 'show this method''s home category'}}.!

Item was added:
+ ----- Method: Lexicon>>customButtonsFrame: (in category 'initialization') -----
+ customButtonsFrame: bottomFraction
+ ^LayoutFrame new
+ leftFraction: 0 offset: 0;
+ topFraction: bottomFraction offset: self buttonHeight negated - 4;
+ rightFraction: 1 offset: 0;
+ bottomFraction: bottomFraction offset: 0!

Item was removed:
- ----- Method: Lexicon>>optionalButtonPairs (in category 'as yet unclassified') -----
- optionalButtonPairs
- "Actually, return triples.  Only the custom lexicon-specific buttons are shown"
- ^ self customButtonSpecs!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Protocols-fbs.30.mcz

Chris Muller-3
Looks like it works, thanks.

On Wed, Apr 14, 2010 at 6:52 AM,  <[hidden email]> wrote:

> A new version of Protocols was added to project The Inbox:
> http://source.squeak.org/inbox/Protocols-fbs.30.mcz
>
> ==================== Summary ====================
>
> Name: Protocols-fbs.30
> Author: fbs
> Time: 14 April 2010, 12:39:30.857 pm
> UUID: 7fb9d193-fac2-f44e-a701-0bf76b787185
> Ancestors: Protocols-fbs.29
>
> This commit corrects the mistakes of Protocols-fbs.29. We now don't abuse optionalButtons, but instead always add the Lexicon's special buttons just above the code pane.
>
> Lexicon thus now respects the #optionalButtons preference.
>
> =============== Diff against Protocols-fbs.29 ===============
>
> Item was added:
> + ----- Method: Lexicon>>listFrame:fromLeft:width: (in category 'initialization') -----
> + listFrame: bottomFraction fromLeft: leftFraction width: rightFraction
> +       ^LayoutFrame new
> +               leftFraction: leftFraction offset: 0;
> +               topFraction: 0 offset: 0;
> +               rightFraction: (leftFraction + rightFraction) offset: 0;
> +               bottomFraction: bottomFraction offset: self buttonHeight negated - 3!
>
> Item was changed:
>  ----- Method: Lexicon>>buildWith: (in category 'toolbuilder') -----
>  buildWith: builder
>        "Create the ui for the browser"
>        | windowSpec max |
>        max := self wantsOptionalButtons ifTrue:[0.32] ifFalse:[0.4].
>        windowSpec := self buildWindowWith: builder specs: {
> +               (self listFrame: max fromLeft: 0 width: 0.5) -> [self buildCategoryListWith: builder].
> +               (self listFrame: max fromLeft: 0.5 width: 0.5) -> [self buildMessageListWith: builder].
> +               (self customButtonsFrame: max) -> [self buildCustomButtonsWith: builder].
> -               (0@0 corner: 0.5@max) -> [self buildCategoryListWith: builder].
> -               (0.5@0 corner: 1@max) -> [self buildMessageListWith: builder].
>                (0@max corner: 1@1) -> [self buildCodePaneWith: builder].
>        }.
>        ^builder build: windowSpec!
>
> Item was changed:
>  ----- Method: Lexicon>>customButtonSpecs (in category 'control buttons') -----
>  customButtonSpecs
>        "Answer a triplet defining buttons, in the format:
>
>                        button label
>                        selector to send
>                        help message"
>        | aa |
>        aa := contentsSymbol == #tiles ifTrue: [{   "Consult Ted Kaehler regarding this bit"
>        {'tiles'.                               #tilesMenu.                                     'tiles for assignment and constants'.   true}.
>        {'vars'.                                #varTilesMenu.  'tiles for instance variables and a new temporary'.     true}
>                }] ifFalse: [#()].      "true in 4th place means act on mouseDown"
>
> +       ^ aa, #(
> -       ^ aa,
> -       {{(ScriptingSystem formAtKey: #TinyMenu) asMorph. #offerMenu. 'click here to get a menu with further options'}.
> -       {self limitClassString. #chooseLimitClass. 'Governs which classes'' methods should be shown.  If this is the same as the viewed class, then only methods implemented in that class will be shown.  If it is ProtoObject, then methods of all classes in the vocabulary will be shown.'.}.},
> -       #(
>        ('follow'                       seeAlso                                                 'view a method I implement that is called by this method')
>        ('find'                         obtainNewSearchString                   'find methods by name search')
>        ('sent...'                      setSendersSearch                                'view the methods I implement that send a given message')
>
>        ('<'                                    navigateToPreviousMethod                'view the previous active method')
>        ('>'                                    navigateToNextMethod                    'view the next active method')
> +       ('-'                                    removeFromSelectorsVisited              'remove this method from my active list'))!
> -       ('-'                                    removeFromSelectorsVisited              'remove this method from my active list')),
> -       {{(ScriptingSystem formAtKey: #Cat) asMorph. #showHomeCategory. 'show this method''s home category'}}.!
>
> Item was added:
> + ----- Method: Lexicon>>customButtonsFrame: (in category 'initialization') -----
> + customButtonsFrame: bottomFraction
> +       ^LayoutFrame new
> +               leftFraction: 0 offset: 0;
> +               topFraction: bottomFraction offset: self buttonHeight negated - 4;
> +               rightFraction: 1 offset: 0;
> +               bottomFraction: bottomFraction offset: 0!
>
> Item was removed:
> - ----- Method: Lexicon>>optionalButtonPairs (in category 'as yet unclassified') -----
> - optionalButtonPairs
> -       "Actually, return triples.  Only the custom lexicon-specific buttons are shown"
> -       ^ self customButtonSpecs!
>
>
>