Closed BECATRUE closed 11 months ago
What do you think of this problem? @kangz12345
Hmm, could you explain in more detail? For example:
A
or the string name "A"?For example, when you try to reopen a builder that is already open, how do you deal with it?
If it is for the same experiment, I would expect to be focused to the already opened window.
- "An app A" means the class A or the string name "A"?
I intended the string name "A". In createApp()
, we use the string name to distinguish apps, so we cannot have multiple apps with the same name.
- What happens if the connection is lost? Which features don't work?
The original app is still remaining in GUI, but the qiwis._apps
dictionary doesn't contain the app anymore.
So we cannot remove the app using destroyApp
and it cannot receive messages of the subscribing channels.
If it is for the same experiment, I would expect to be focused to the already opened window.
I also agree with you!
Currently in order to implement this, first we reqeust a qiwiscall to fetch the app name list and second compare them directly.
But I think it is inconvenient because we use two qiwiscalls; createApp
and appNames
, so I want to handle it internally.
Thank you for the explanation.
In that case, I think createApp()
should check if the name already exists, and raise an error if it does.
Oh, I came up with an idea!
As you said, createApp()
should check it, but it may raise an error or replace the original app into the new one according to the given option in config.json
.
I think it helps us to refresh the app through just re-opening it.
But it may be convoluted, so if you think it isn't necessary, it's okay to stick to the above decision.
Hmm, if you think that such feature is helpful for some cases, I think giving it as a parameter would be enough.
For example, createApp(name: str, info: AppInfo, replace: bool = False):
.
Oh, it looks simpler! I also agree with you.
You linked the wrong issue there. I will close this as completed.
cf. You can search issue after typing #. For example, #re-creating...
Describe the bug
When an app A exists, if we requests creating the app A again, it seems to be added well on the GUI, but internally, the connection to the existing app is lost.
Expected behavior
I came up with two solutions:
Additional context
For example, when you try to reopen a builder that is already open, how do you deal with it?