[squeak-dev] [Documentation] Classes with class comment with size
> 1000 chars
Michael Haupt
mhaupt at gmail.com
Sun May 2 19:31:14 UTC 2010
Hi again,
On Sun, May 2, 2010 at 9:23 PM, Michael Haupt <mhaupt at gmail.com> wrote:
>> Questions:
>> 1) How do I get them only once?
>
> This:
>
> [ Smalltalk allClasses select: [ :class | class organization
> classComment size > 1000] ]
>
> gives me 130 (just updated my Trunk image).
>
>> 2) How do I get them sorted in the dictionary?
>
> A dictionary is not sorted by default. Or is it?
eh, for some reason, the Array that the above code gives me is sorted
by class name already. Nice. :-) I just saw in SystemDictionary that
#classNames returns a SortedCollection in any case. Even nicer. :-)
So, a dictionary probably won't help, but what about an Array with Associations?
[ Smalltalk allClasses
select: [ :class | class organization classComment size > 1000 ]
thenCollect: [ :class | class -> class organization classComment ] ]
Best,
Michael
More information about the Squeak-dev
mailing list
|