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

Tobias Pape Das.Linux at gmx.de
Sat Apr 28 00:06:24 UTC 2012


Am 2012-04-28 um 01:35 schrieb H. Hirzel:

> 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.

Then in Cuis you can either do 

	Character class cr

Or Character does not understand #cr 

Right?

Best
	-Tobias



More information about the Beginners mailing list