Created attachment 188927 [details] Bug illustration Testing (a bit lately) a fix related to a very similar bug (#105609, thanks to Stephan Bergmann), I realized that it still doesn’t work if the python script is updated from an external file. This practical use case is illustrated in Apso, which allows to edit embedded scripts by copying them in a temp directory before embedding them back into the document. I attach a new file that mimics this behaviour: extracting, updating and embedding back a python script. As you’ll see, the document script provider will remain unaware of the update. Thanks again for all.
Created attachment 188974 [details] some improvement unrelated to the issue
The Problem is the Combination of Embedded Code AND the »Link« from some Event, executing via →Tools→Macros works well. Sorry didnt know how to fix, but only the Workaround →save the Document and →reload the Document. have a look on the changed Code ( doesnt solve the issue )
Thank for your reply. The workaround *is* the bug: the script provider should be informed of the changed without the need to reload the document.
NEW per Werner's confirmation.