[squeak-dev] No senders of #fooBar (was: USe of isKindOf: is a crime against humanity)

Casey Ransberger casey.obrien.r at gmail.com
Mon Sep 2 11:10:44 UTC 2013


I've done stuff like this too. What I was pointing out was mostly composing
selectors from strings. One great way to tell e.g. ME that a message
actually is sent somewhere when doing these kinds of shenanigans is to
write an SUnit test which includes the composed selector. Then it will
still show up as being sent, and I'll know not to remove the method from my
image as useless.

Make sense, gents? :)


On Mon, Sep 2, 2013 at 4:04 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:

> On 2013-09-01, at 11:32, Stéphane Rollandin <lecteur at zogotounga.net>
> wrote:
>
> >> someObject perform: ('foo' , 'Bar') asSymbol. "There are no senders of
> >> #fooBar! Oh wait..."
> >
> > (SimpleButtonMorph new
> >       label: 'Test';
> >       target: (MessageSend receiver: World selector: #fooBar);
> >       actionSelector: #value) openInHand
> >
> > ... no senders of #fooBar are found either.
> >
> > Of course the above example is silly, but my point is that the look-up
> for senders is not comprehensive anyway.
> >
> > Stef
>
> I have occasionally put a literal array of all the constructed selectors
> at the sending site, just to facilitate senders browsing:
>
>         #(fooBar fooBaz fooFum). "for senders browsing"
>         someObject perform: ('foo' , thing) asSymbol.
>
> It even helps to do that if the selector is not constructed but simply
> performed after being passed into the method.
>
> - Bert -
>
>
>
>


-- 
Casey Ransberger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130902/2ec7ef47/attachment.htm


More information about the Squeak-dev mailing list