Le 01/05/2015 12:51, Marcus Denker a écrit :

On 01 May 2015, at 12:41, Yuriy Tymchuk <yuriy.tymc...@me.com> wrote:

Hi, is it possible to do a halt whenever some instance variable is written?

Soon… I am working on it.

Make a class TT with ivar ‘tt’, method
tt
        tt := 1.


Then we can define a meta-link to call "Halt now”:


| link |
link := MetaLink new
                                metaObject: Halt;
                                selector: #now.

This we can install on the Slot itself:
                                
(TT slotNamed: #tt) link: link.


If we now call

TT new tt

it will tell you that we need to implement #write:to: in LinkWrapper… ;-)
Which means a lot of the basic machinery is working!

Next week...

Can't wait :)

Thierry


        Marcus




Reply via email to