Squeak programming question

Holger_Hoch%MICFFM at pmsmicado.com Holger_Hoch%MICFFM at pmsmicado.com
Mon Mar 22 16:48:04 UTC 1999




Ivan Tomek wrote:

> You could then do
>
> ...
> caller setter1: object1
> caller setter2: object2
> ...


what i dislike about this solution is that the called method
has to have knowledge about the sender.
This seems to be a precondition that in general is not satisfied.

In Visual Smalltalk (sorry, i don't know squeak so well) there
is a special Exceptions subclass, Notification. This could be used
to implement something like a resumable ResultNotification.
These ResultNotifications could be caught if you are interested in any
result, providing an Association (aspectName -> result_n) as value.
This would look somehow like:

[anOnject multiResultMethod]
     on: ResultNotification
     do: [:result |self doSomethingWith: result]


-- Holger


-------------------------------------------------------------------

This room is intentionally blank.





More information about the Squeak-dev mailing list