Skip to content
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

Merged
3 commits merged into from
Dec 27, 2019
Merged

Set instance if not instantiated #1075

3 commits merged into from
Dec 27, 2019

Conversation

jmthomas
Copy link
Contributor

@jmthomas jmthomas commented Nov 3, 2019

closes #1012

@jmthomas jmthomas requested a review from a user November 3, 2019 23:43
@@ -53,6 +53,10 @@ class TlmViewer < QtTool
@@instance = nil

def self.instance
unless @@instance
_, options = create_default_options()
TlmViewer.new(options)
Copy link

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.

Copy link

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.

Copy link

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.

Copy link
Contributor Author

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 .

Copy link

@ghost ghost left a 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)
Copy link

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.

@jmthomas jmthomas assigned ghost Nov 26, 2019
@ghost ghost merged commit 94a70d5 into master Dec 27, 2019
@ghost ghost deleted the tlm_viewer_screen_display branch December 27, 2019 20:48
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Screens can't call display when launched with --screen
2 participants