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

Bert Freudenberg bert at freudenbergs.de
Mon Sep 2 11:04:05 UTC 2013


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 -




More information about the Squeak-dev mailing list