[GH-ISSUE #159] Proposal: RunWithScreen() #125

Closed
opened 2026-03-04 01:02:10 +03:00 by kerem · 2 comments
Owner

Originally created by @progrium on GitHub (Aug 30, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/159

Creating a custom tcell.Screen is the only way to get these types of systems to work over non-stdio environments (like SSH), but tview doesn't allow you any control over the screen it uses. I'm going to fork and patch for my uses but I'd like to submit a PR to fix this so I'd like to discuss the API.

I figure the easiest thing is to provide an alternative Application.Run that takes a tcell.Screen, perhaps like RunWithScreen(screen tcell.Screen).

Originally created by @progrium on GitHub (Aug 30, 2018). Original GitHub issue: https://github.com/rivo/tview/issues/159 Creating a custom tcell.Screen is the only way to get these types of systems to work over non-stdio environments (like SSH), but tview doesn't allow you any control over the screen it uses. I'm going to fork and patch for my uses but I'd like to submit a PR to fix this so I'd like to discuss the API. I figure the easiest thing is to provide an alternative Application.Run that takes a tcell.Screen, perhaps like `RunWithScreen(screen tcell.Screen)`.
kerem closed this issue 2026-03-04 01:02:11 +03:00
Author
Owner

@rivo commented on GitHub (Sep 5, 2018):

I've added the SetScreen() function to Application. I think this should help you achieve what you want to do.

Please note that it there may be issues if you use Application.Suspend(). If you really need to use Suspend(), I might have to think about a different solution.

Let me know if this works for you.

<!-- gh-comment-id:418697005 --> @rivo commented on GitHub (Sep 5, 2018): I've added the `SetScreen()` function to `Application`. I think this should help you achieve what you want to do. Please note that it there may be issues if you use `Application.Suspend()`. If you really need to use `Suspend()`, I might have to think about a different solution. Let me know if this works for you.
Author
Owner

@progrium commented on GitHub (Sep 5, 2018):

Nice, thank you! This should work perfectly.

<!-- gh-comment-id:418810549 --> @progrium commented on GitHub (Sep 5, 2018): Nice, thank you! This should work perfectly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#125
No description provided.