patching base classes

Torge Husfeldt jean-jaques.gelee at gmx.de
Fri Nov 19 09:19:42 UTC 1999


Ian Piumatra wrote:
----- Original Message -----
From: Ian Piumarta <Ian.Piumarta at inria.fr>
> Object>>doesNotUnderstand: aMessage
> "Handle the fact that there was an attempt to send the given message to
the receiver but the receiver does not understand this message (typically
sent from the machine when a message is sent to the receiver and no method
is defined for that selector)."
> "Testing: (3 activeProcess)"
>
> (Preferences autoAccessors and: [self tryToDefineVariableAccess:
aMessage])
> ifTrue: [^ aMessage sentTo: self].
> (Preferences autoDeclineMembership
> and: [(aMessage selector beginsWith: 'is')
> and: [Symbol
> hasInterned: (aMessage selector copyFrom: 3 to: aMessage selector size)
> ifTrue: [:sym | (Smalltalk includesKey: sym) ifTrue: [^false]]]])
> ifTrue: [^ false].
> MessageNotUnderstood new message: aMessage;
> signal.
> ^aMessage sentTo: self

I think this is just great!
When will it be incorporated in the Squeak mainstream?
Along with the obvious other changes of course. I.e.:
* Deleting every is... selector from Object which returns false.
* Replacing every isKindOf: HappyObject with isHappyObject
* implementing isHappyObject (=>true) in Class HappyObject.
This would solve about 200 of SMA's Problems
(see ohter thread: Of one who tired to strip the image).
It wold make Squeak more scaleable (i.e. implement isHappyObject => true in
any class that behaves like a HappyObject) and more clean.

Reageds, Torge





More information about the Squeak-dev mailing list