[Q][Newbie] perform:orSendTo:
germanmorales at delta-sys.com
germanmorales at delta-sys.com
Sat Jun 22 21:11:26 UTC 2002
Hello!
I was trying to build a little user interface using a
PluggableListMorph when I got a MessageNotUnderstood.
The problem seems to be that Object>>perform:orSendTo:
doesn't do what its selector says, but just sends the
message to the other possible target.
The implementation in my (updated) Squeak3.2 shows:
Object>>perform: selector orSendTo: otherTarget
"If I wish to intercept and handle selector myself,
do it; else send it to otherTarget "
^ otherTarget perform: selector
The fix is almost obvious:
Object>>perform: selector orSendTo: otherTarget
^ ((self respondsTo: selector)
ifTrue: [self]
ifFalse: [otherTarget])
perform: selector
and I was even able to find another version listed here:
http://coweb.cc.gatech.edu/cs2340/14
Mi questions are:
Why this is not the current implementation?
It's just a bug or there's something else behind?
Should I send a change set with such a fix? ;-)
may the Force be with you,
German
More information about the Squeak-dev
mailing list
|