[squeak-dev] The Inbox: System-topa.378.mcz
Tobias Pape
Das.Linux at gmx.de
Mon Sep 27 11:29:19 UTC 2010
Hi,
is there a trunk-commiter that would take care of including this?
Background: In a class of mine i had a method with a special
selector that contained a space (I needed that, really, and had it working)
but then the senders/implementors button stopped working:
instead of
_______________
|some selector|
+-------------+
|msg:with: |
|value: |
|at:put: |
+-------------+
I got
___________
|some |
+---------+
|selector |
|msg:with:|
|value: |
|at:put: |
+---------+
which, additionally, resulted in an off-by-one when clicking an
item: clicking on 'value:' resulted in the list of senders/implementors
of at:put:
The Provided patch fixes this behaviour.
So Long,
-Tobias
Am 2010-09-27 um 09:17 schrieb commits at source.squeak.org:
> A new version of System was added to project The Inbox:
> http://source.squeak.org/inbox/System-topa.378.mcz
>
> ==================== Summary ====================
>
> Name: System-topa.378
> Author: topa
> Time: 27 September 2010, 11:17:30.574 am
> UUID: beb6b8d8-c9fb-41ff-b859-731ca8f6b843
> Ancestors: System-nice.377
>
> Fix the menu build method that relied on
> coverting a collection of strings to a large string just to split it again.
>
> =============== Diff against System-nice.377 ===============
>
> Item was changed:
> ----- Method: SystemNavigation>>showMenuOf:withFirstItem:ifChosenDo:withCaption: (in category 'ui') -----
> showMenuOf: selectorCollection withFirstItem: firstItem ifChosenDo: choiceBlock withCaption: aCaption
> "Show a sorted menu of the given selectors, preceded by firstItem, and all abbreviated to 40 characters. Use aCaption as the menu title, if it is not nil. Evaluate choiceBlock if a message is chosen."
>
> | index menuLabels sortedList |
> sortedList := selectorCollection asSortedCollection.
> + menuLabels := Array streamContents:
> + [:strm | strm nextPut: (firstItem contractTo: 40).
> + sortedList do: [:sel | strm nextPut: (sel contractTo: 40)]].
> + index := UIManager default chooseFrom: menuLabels lines: #(1).
> - menuLabels := String streamContents:
> - [:strm | strm nextPutAll: (firstItem contractTo: 40).
> - sortedList do: [:sel | strm cr; nextPutAll: (sel contractTo: 40)]].
> - index := UIManager default chooseFrom: (menuLabels substrings) lines: #(1).
> index = 1 ifTrue: [choiceBlock value: firstItem].
> index > 1 ifTrue: [choiceBlock value: (sortedList at: index - 1)]!
>
>
More information about the Squeak-dev
mailing list
|