[PR #59] [CLOSED] (application) expose tcell.Screen through getter #849

Closed
opened 2026-03-04 01:08:13 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/59
Author: @zaquestion
Created: 2/20/2018
Status: Closed

Base: masterHead: expose_screen


📝 Commits (1)

  • 8b3e475 (application) expose tcell.Screen though getter

📊 Changes

1 file changed (+20 additions, -17 deletions)

View changed files

📝 application.go (+20 -17)

📄 Description

This is largely for reference and isn't expected to be merged as is.

Curious what your thoughts are on exposing the screen to the user? Currently its difficult to do so since Run() creates the screen and starts the event loop. As a proof of concept I moved it into NewApplication, but needed add an error to the return. This kind of API breakage probably isn't the best idea, so perhaps this functionality would be best served in a seperate function (like NewApplicationScreen() and Run() updated to check for a screen before creatinga a new one.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rivo/tview/pull/59 **Author:** [@zaquestion](https://github.com/zaquestion) **Created:** 2/20/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `expose_screen` --- ### 📝 Commits (1) - [`8b3e475`](https://github.com/rivo/tview/commit/8b3e475fe6783230400c3c82afe1a34b9edb734d) (application) expose tcell.Screen though getter ### 📊 Changes **1 file changed** (+20 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `application.go` (+20 -17) </details> ### 📄 Description This is largely for reference and isn't expected to be merged as is. Curious what your thoughts are on exposing the screen to the user? Currently its difficult to do so since `Run()` creates the screen and starts the event loop. As a proof of concept I moved it into `NewApplication`, but needed add an error to the return. This kind of API breakage probably isn't the best idea, so perhaps this functionality would be best served in a seperate function (like `NewApplicationScreen()` and `Run()` updated to check for a screen before creatinga a new one. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:08:13 +03:00
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#849
No description provided.