[3.9a6703 BUG] Try to find senders of message give this walk up

Lic. Edgar J. De Cleene edgardec2001 at yahoo.com.ar
Tue Nov 8 14:27:55 UTC 2005


I think this .cs fix the problem.
I wait approval / dislikes before I continue.

Edgar

-------------- next part --------------
'From Squeak3.9alpha of 4 July 2005 [latest update: #6703] on 8 November 2005 at 11:09:14 am'!
"Change Set:		SystemNavigation-showMenuOfwithFirstItemifChosenDowithCaption
Date:			8 November 2005
Author:			Edgar J. De Cleene

This try to fix a walkback when you hit senders or implementors in buttons and menus"!


!SystemNavigation methodsFor: 'ui' stamp: 'edc 11/8/2005 10:58'!
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 _ 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