[Newbies] Test if a class has a certain selector?

H. Hirzel hannes.hirzel at gmail.com
Fri Apr 27 23:35:16 UTC 2012


Thank you Tobias and Herbert for the answers

Interestingly

Squeak 4.3
--------------
('a' respondsTo: #first) == (String canUnderstand: #first)
evaluates to true

(Character respondsTo: #cr) == (Character canUnderstand: #cr)
evaluates to false

Pharo 1.4
-----------
the same as Squeak

Cuis 4.0
---------
true in both cases.

--Hannes

On 4/28/12, Herbert König <herbertkoenig at gmx.net> wrote:
> Hi Hannes,
>
> HH> Is there a simpler way of writing
>
> HH>      Character class selectors includes: #cr
>
> Character respondsTo: #cr
>
>
> Cheers,
>
> Herbert
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>


More information about the Beginners mailing list