[newbie] perform:orSendTo:

Jason McVay jmcvay at ipa.net
Wed Oct 27 11:21:29 UTC 1999


hello all--

in Object>>perform:orSendTo:, i don't understand why the code is

Object>>perform: selector orSendTo:otherTarget
    ^ otherTarget perform: selector

instead of:

perform: selector orSendTo:otherTarget
    (self respondsTo: selector)
        ifTrue: [^ self perform: selector]
        ifFalse: [^ otherTarget perform: selector]


it seems that the Object>>perform:orSendTo: doesn't give 'self' the
opportunity to respond to the #selector message. can someone explain this to
me?

thanks in advance
jason





More information about the Squeak-dev mailing list