Creating services

Marcus Denker denker at iam.unibe.ch
Sun Jan 22 12:35:38 UTC 2006


Hi,

I don't think that this has been changed.

perform: selector orSendTo: otherTarget
	"If I wish to intercept and handle selector myself, do it; else send  
it to otherTarget"
	^ otherTarget perform: selector

sw 10/30/1998

But we had already multiple people requesting this to be changed in a  
way that it
does what the selector says:

http://bugs.impara.de/view.php?id=1666

perform: selector orSendTo: otherTarget
	"If I wish to intercept and handle selector myself, do it; else send  
it to otherTarget"
	^ (self respondsTo: selector) ifTrue: [self perform: selector]  
ifFalse: [otherTarget perform: selector]! !

The only pronlem was that, hehe, the wrong code was there by design,  
this bug report was done multiple
times the past and allways rejecte by SqC.

I tend to just implement the method that it does what it says and see  
what will break.

       Marcus


On 22.01.2006, at 13:24, stéphane ducasse wrote:

> Romain was checking services and apparently we have to take into  
> account a change between 6706 and 6713
>
>
>> 	While checking this procedure, I actually found that there is a  
>> difference of behavior between version 6706 and version 6713
>> 	of squeak preventing this to work: Object>>#perform:orSendTo: has  
>> been modified between the two version.
>>
>> 	The bottomline is that the following method should be added:
>>
>> 	ServiceAction >> perform: selector orSendTo: otherTarget
>> 		^ self perform: selector
>>
>>
>> 	Stef, could you put that in the update stream?
>>
>> 	Diego, feel free to ask further question if you need to.
>>
>> 		Romain
>




More information about the V3dot9 mailing list