Hi Konrad,

sorry, I might have misread your question such that it was about updating references to an obsolete object.

However, there is another fun possibility to figure out that a change happened that does not involve configuration - though, a bit hacky. ;-) You could write the accessor method such that it recompiles itself with the first access after loading new code. For example:

Singleton>>uniqueInstance
 instance := self class new.
 self class compile: 'uniqueInstance ^instance'.
 ^instance

Best, Steffen


Am .01.2019, 18:04 Uhr, schrieb Konrad Hinsen <konrad.hin...@fastmail.net>:

Hi Steffen,

Have you considered to yield (an) proxy object(s) instead of the actual > Singleton in uniqueInstance? This way it suffices to update the proxy
 > with each update of the code.
I am not sure I understand what you are proposing. My problem is figuring out how to change in-memory objects when they become obsolete after a code change. So I'd say it doesn't matter much if the object I need to change is the singleton or a proxy to it, but maybe I am missing something!

Cheers,
   Konrad.

Reply via email to