--- Begin Message ---> is possible to intercept (before writeú all instance variable writes on every > existing objects? > > I found a discussion here: > http://forum.world.st/Is-it-possible-to-follow-an-object-through-a-computation-td5092459.html > > Known solutions: > .... > 3) Metalinks - it's based on intercepting method calls, right? But I need to > intercept direct instance variable write, so probably not possibleOk, I learned more about MetaLinks and it's perfectly possible to intercept instance variable writes via. installing MetaLink into object instance (cool) - then I can intercept instvar write, but one problem immediately occurs: when installing MetaLink into object instance, an original object class is exchanged to anonymous subclass of the original class - and because typical #= method is implemented like: = self == anObject ifTrue: [ ^ true ]. self class = anObject class ifFalse: [ ^ false ]. ... then most of #= comparisons in application logic is broken due to "self class = anObject class" part. Is there any way to solve this problem? Thanks! pf
--- End Message ---
Re: [Pharo-users] How to intercept instvar write - MetaLinks + anonymous subclass problem
Petr Fischer via Pharo-users Fri, 01 Feb 2019 18:24:07 -0800
- [Pharo-users] How to intercept every instance... Petr Fischer via Pharo-users
- Re: [Pharo-users] How to intercept instv... Petr Fischer via Pharo-users
- Re: [Pharo-users] How to intercept i... Steven Costiou
- Re: [Pharo-users] How to interce... Petr Fischer via Pharo-users
- Re: [Pharo-users] How to int... Steven Costiou
- Re: [Pharo-users] How to int... Marcus Denker
- Re: [Pharo-users] How to intercept every... Peter Uhnak
