This is evidenced by the associated windows being destroyed and recreated, although with no visible change to the open windows of the instances.
Furthermore, it seems AddOn instance variables are initialized only once, at compilation. Any changes to them in the code remain as changed on the next invocation of the AddOn. For example, an instance string initialized to "Fred" and subsequently set to "Harry" in the code will be "Harry" on the next invocation of the AddOn. They seem to be treated as static. Is this "unusual" behaviour documented?
Although the re-initialization is not likely to eventuate in production as recompilation is unlikely to occur in a production environment, surely this can be avoided in development too? And it is imperative to know that instance variables are not really instance at all in the context of an AddOn. Essentially, one must explicitly initialize all instance variables at runtime to ensure they start out with the expected values.
Thanks.
Comment