All,
I have a following problem. I have a script that opens\closes multiple tables and windows, and I create several namespaces to handle this. I also delete those namespaces in <<On Close() of the main window.
I found that when I have two instances of the script running, closing main window in one of them deletes the namespaces and breaks the other script.
How do I make namespaces separate for each instance or, alternatively, how do I only allow one instance of the script\add-in running?
I understand that in
ns = New Namespace();
ns is a reference, and there is a unique name, like "#43" that is assigned every time a namespace is created. I can get that name by <<Get Name() and thus point to a specific and unique namespace, but how can I make it work in multiple instances? Like, ns in one running script instance is referring to "#43", and ns in another running instance is referring to, let's say, "#44"?