[squeak-dev] The Inbox: System-topa.378.mcz

Tobias Pape Das.Linux at gmx.de
Mon Sep 27 12:14:57 UTC 2010


Am 2010-09-27 um 13:56 schrieb Hannes Hirzel:
> On 9/27/10, Tobias Pape <Das.Linux at gmx.de> wrote:
>> 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:
> 
> Could you please explain a bit more why you think you need selectors
> with spaces? Actually space are meant to separate selectors.....


Hi Hannes, 

Indeed, normal selectors are separatable by spaces.
However, in my class I use a custom compiler and a 
custom method dictionary. Actually, the selectors for 
methods in that class can contain any character, not only 
just spaces, but no Newline (contrasting normal selectors in a method)
  My point isn't that selectors are not separatable by strings,
but that the implementation SystemNavigation>>showMenuOf:withFirstItem:ifChosenDo:withCaption:
relies on that there are no spaces in the list. However, the 
method has a generic name and is actually relatively agnostic of
the lists content. So, you can have different drop down lists, when
implementing your own system navigation.

Look at the now removed lines:
-	menuLabels := String streamContents: 
- 		[:strm | strm nextPutAll: (firstItem contractTo: 40).
- 		sortedList do: [:sel | strm cr; nextPutAll: (sel contractTo: 40)]].

that is, when firstItem is 'foo' and the sortedList is #(bar: baz: zork:)
the menuLabels becomes: 
'foo
bar:
baz:
zork:'

just to be splitted into #('foo' 'bar:' 'baz:' 'zork:') right after that ;)

Hope that clarified my motivation

So Long,
	-Tobias





More information about the Squeak-dev mailing list