[Pharo-project] Collection extensions
gazzaguru2 at btinternet.com
Mon Jan 5 13:28:25 EST 2009
In a similar vein, one I have found useful with the Report Builder for
enablement of toolbar buttons/menu options in a multiple selection case:
"Answer whether the result of evaluating the given
block for each element of the receiver has the same
value in each case."
self ifEmpty: [^true].
val := aBlock value: self anyOne.
^self allSatisfy: [:e | (aBlock value: e) = val]
----- Original Message -----
From: "Alexandre Bergel" <alexandre at bergel.eu>
To: <Pharo-project at lists.gforge.inria.fr>
Sent: Monday, January 05, 2009 6:02 PM
Subject: Re: [Pharo-project] Collection extensions
> On 5 Jan 2009, at 14:53, Gary Chambers wrote:
>> Can't remember the number of times I've had to implement these kinds
>> generally useful methods on various Smalltalk dialects (particularly
>> #groupedBy:, called it #categorizedBy: myself ;-) ). Really should
>> be part
>> of all Smalltalks. I'd push for general adoption/standardisation for
>> dialect! That's the only way Smalltalk is going to evolve, the "ANSI
>> standard" is years behind!
>> Regards, Gary.
>>> So why do we do pharo. Really. If everything as to be compatible with
>>> smalltalk. Terrible.
>>> Can't we get smarter?
>>> Why can't we tag the methods with <notAnsi> and build a tool that
>>> check when you
>>> do a fill out. I do not write code to be portable to VisualWorks so?
>>>> I would prefer to have such extension methods separate from the
>>> Me not. Because then in a lot of places I will have to inline their
>>> Pharo-project mailing list
>>> Pharo-project at lists.gforge.inria.fr
>> Pharo-project mailing list
>> Pharo-project at lists.gforge.inria.fr
> Alexandre Bergel http://www.bergel.eu
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
More information about the Pharo-dev