Hi, is it possible to do a halt whenever some instance variable is written? Because this week Iâve spent a lot of time debugging because something was setting some strange values to variables and it was hard to track that down. Uko
On 01 May 2015, at 12:41, Yuriy Tymchuk <yuriy.tymchuk@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... Marcus
Le 01/05/2015 12:51, Marcus Denker a écrit :
On 01 May 2015, at 12:41, Yuriy Tymchuk <yuriy.tymchuk@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
Thanks Marcus! This will be very useful. Uko
On 01 May 2015, at 12:51, Marcus Denker <marcus.denker@inria.fr> wrote:
On 01 May 2015, at 12:41, Yuriy Tymchuk <yuriy.tymchuk@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...
Marcus
Yes because we can do more after that :) Stef Le 1/5/15 13:04, Yuriy Tymchuk a écrit :
Thanks Marcus! This will be very useful.
Uko
On 01 May 2015, at 12:51, Marcus Denker <marcus.denker@inria.fr> wrote:
On 01 May 2015, at 12:41, Yuriy Tymchuk <yuriy.tymchuk@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...
Marcus
On Fri, May 1, 2015 at 6:41 PM, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Hi, is it possible to do a halt whenever some instance variable is written?
Because this week Iâve spent a lot of time debugging because something was setting some strange values to variables and it was hard to track that down.
Uko
Old style... replace all direct ivar references with call to ivar's accessor method, then halt in that -- or if interactive do this... Transcript crShow: thisContext sender printString. but I'm really looking forward to trying it with MetaLinks. cheers -ben
participants (5)
-
Ben Coman -
Marcus Denker -
stepharo -
Thierry Goubier -
Yuriy Tymchuk