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

Tobias Pape Das.Linux at gmx.de
Fri Apr 27 23:01:15 UTC 2012


Am 2012-04-28 um 00:45 schrieb H. Hirzel:

> Hello
> 
> Is there a simpler way of writing
> 
>     Character class selectors includes: #cr
> 
> (= test if Character class has method  #cr)

Character canUnderstand: #cr

remember, its messages,
=>
('a' respondsTo: #first) == (String canUnderstand: #first)

:)

Best
	-Tobias



More information about the Beginners mailing list