[Newbies] Testing for message excistance

Mispunt mispunt at users.sourceforge.net
Tue May 1 09:06:46 UTC 2007


Thanks, I will try it :)

Mispunt

On 5/1/07, Norbert Hartl <norbert at hartl.name> wrote:
> On Tue, 2007-05-01 at 10:52 +0200, Mispunt wrote:
> > Hi people,
> >
> > I there a way to run a test to be sure that a message exists in a
> > class? I am working on some peace of code that just run a message of a
> > unknown class, so it is possible that this message doesn't exist and
> > fire an error.
> >
> Yes, you can use respondsTo: aSymbol. So trying to find a method
> print would lead to
>
> ObjectOrClass respondsTo: #print
>
> Norbert
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>


More information about the Beginners mailing list