> > Next step: when *changing* the condition object (e.g. to true or false or a > different block), we > need to re-generate code. > > ==> we need #invalidate on the MetaLink and call it on #condition:. > This is the next step for (hopefully) tomorrow. >
This issue: https://pharo.fogbugz.com/f/cases/15435 <https://pharo.fogbugz.com/f/cases/15435> has the change. The idea is that all accessors in MetaLink call #invalidate which just does invalidate nodes do: [ :node | node invalidate ] With this simple change, one can now use e.g. a boolean as a link condition: haltLink := MetaLink new condition: false; metaObject: Halt; selector: #now. When installed, it does nothing. But we can afterwards change the condition: haltLink condition: true. and it will make sure to re-compile all affected code before the next execution and thus enable the link. The same is true for #selector: and #metaObject:. Marcus
