Le 09/09/2015 21:00, Mariano Martinez Peck a écrit :
If you can live with only intercepting setters (not assigments) , then
you can run some code AFTER loading the code, to install some method
wrappers or Marea CompiledMethod proxy that intercept the execution of
the setter method and do whatever you want. In the worst case you simply
must re-run such script after reloading the code ....

You can also use Jejak to trace assignments with the same approach (i.e. to reinstall the probes after loading a new version), but you'll have to adapt one of the Jejak rewriter for that (or filter the generated events to retrieve only the ones relevant to your instance variable).

By the way, Marcus, how do Metalinks behave in this scenario (i.e. reloading a new version of the code). Are they lost?

Thierry



On Wed, Sep 9, 2015 at 3:27 PM, stepharo <steph...@free.fr
<mailto:steph...@free.fr>> wrote:

    Not yet :)

    Le 9/9/15 18:18, Peter Uhnák a écrit :

        Hi,

        is there a mechanism for observing a change of regular variables?

        Normally I would use ValueHolder (or fire announcements
        manually), but this assumes I can change the code.

        For example imagine a method of someone else's package
        ~~~~~~~~~~~~~~~
        FAMIXNamedEntity>>name: aString
             name := aString
        ~~~~~~~~~~~~~~~

        I could simply override the method, but that's very brittle
        since if I were to update the package it would load the
        "unmodified" version.

        Can I somehow overload the assignment operator? Can I augment
        methods? Is this even possible?

        Thanks,
        Peter






--
Mariano
http://marianopeck.wordpress.com


Reply via email to