-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set instance if not instantiated #1075
Conversation
@@ -53,6 +53,10 @@ class TlmViewer < QtTool | |||
@@instance = nil | |||
|
|||
def self.instance | |||
unless @@instance | |||
_, options = create_default_options() | |||
TlmViewer.new(options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TlmViewer#initialize does a whole bunch of stuff you don't want to do / or waste time doing for just the --screen case. A new option probably needs to be added before calling TlmViewer.new that only does the minimal stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want a full instance of TlmViewer so the next guy who calls screen just works. That way the user can also use it and there's a connection back to the server. Otherwise you have this magic screen with a hidden TlmViewer backend? Then we have to figure out how to kill that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - There is supposed to be a non-listening hidden TlmViewer backend. That way you can call --screen lots of times and not open any sockets. I agree that things like buttons that open other screens should work. But there should not be a main TlmViewer screen chooser window, and it should not listen to the socket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryanatball I'm going to punt this back to you then. I'm not sure how this might dovetail with the --screen option we already have which looks like it's setting up a standalone backend .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment.
@@ -53,6 +53,10 @@ class TlmViewer < QtTool | |||
@@instance = nil | |||
|
|||
def self.instance | |||
unless @@instance | |||
_, options = create_default_options() | |||
TlmViewer.new(options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - There is supposed to be a non-listening hidden TlmViewer backend. That way you can call --screen lots of times and not open any sockets. I agree that things like buttons that open other screens should work. But there should not be a main TlmViewer screen chooser window, and it should not listen to the socket.
closes #1012