[GH-ISSUE #370] BUG: screen.SetContent undefined (type tcell.Screen has no field or method SetContent) #272

Closed
opened 2026-03-04 01:03:31 +03:00 by kerem · 7 comments
Owner

Originally created by @shockw4ver on GitHub (Nov 25, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/370

Got some problem running the basic example.

env:

  • os: macOS 1.15.1 Catalina
  • go: v1.13.4

run:

package main

import (
	"github.com/rivo/tview"
)

func main() {
	box := tview.NewBox().SetBorder(true).SetTitle("Hello, world!")
	if err := tview.NewApplication().SetRoot(box, true).Run(); err != nil {
		panic(err)
	}
}

Got:

# NBAGo2/vendor/github.com/rivo/tview
vendor/github.com/rivo/tview/box.go:256:11: screen.SetContent undefined (type tcell.Screen has no field or method SetContent)
vendor/github.com/rivo/tview/box.go:281:10: screen.SetContent undefined (type tcell.Screen has no field or method SetContent)
vendor/github.com/rivo/tview/box.go:282:10: screen.SetContent undefined (type tcell.Screen has no field or method SetContent)
vendor/github.com/rivo/tview/box.go:285:10: screen.SetContent undefined (type tcell.Screen has no field or method SetContent)
vendor/github.com/rivo/tview/box.go:286:10: screen.SetContent undefined (type tcell.Screen has no field or method SetContent)
vendor/github.com/rivo/tview/box.go:288:9: screen.SetContent undefined (type tcell.Screen has no field or method SetContent)
vendor/github.com/rivo/tview/box.go:289:9: screen.SetContent undefined (type tcell.Screen has no field or method SetContent)
vendor/github.com/rivo/tview/box.go:290:9: screen.SetContent undefined (type tcell.Screen has no field or method SetContent)
vendor/github.com/rivo/tview/box.go:291:9: screen.SetContent undefined (type tcell.Screen has no field or method SetContent)
vendor/github.com/rivo/tview/styles.go:34:31: undefined: tcell.ColorDarkCyan
vendor/github.com/rivo/tview/box.go:291:9: too many errors

Is this about Catalina?
Thx and waiting any resolvation.

Originally created by @shockw4ver on GitHub (Nov 25, 2019). Original GitHub issue: https://github.com/rivo/tview/issues/370 Got some problem running the basic example. env: * os: macOS 1.15.1 Catalina * go: v1.13.4 run: ```go package main import ( "github.com/rivo/tview" ) func main() { box := tview.NewBox().SetBorder(true).SetTitle("Hello, world!") if err := tview.NewApplication().SetRoot(box, true).Run(); err != nil { panic(err) } } ``` Got: ```bash # NBAGo2/vendor/github.com/rivo/tview vendor/github.com/rivo/tview/box.go:256:11: screen.SetContent undefined (type tcell.Screen has no field or method SetContent) vendor/github.com/rivo/tview/box.go:281:10: screen.SetContent undefined (type tcell.Screen has no field or method SetContent) vendor/github.com/rivo/tview/box.go:282:10: screen.SetContent undefined (type tcell.Screen has no field or method SetContent) vendor/github.com/rivo/tview/box.go:285:10: screen.SetContent undefined (type tcell.Screen has no field or method SetContent) vendor/github.com/rivo/tview/box.go:286:10: screen.SetContent undefined (type tcell.Screen has no field or method SetContent) vendor/github.com/rivo/tview/box.go:288:9: screen.SetContent undefined (type tcell.Screen has no field or method SetContent) vendor/github.com/rivo/tview/box.go:289:9: screen.SetContent undefined (type tcell.Screen has no field or method SetContent) vendor/github.com/rivo/tview/box.go:290:9: screen.SetContent undefined (type tcell.Screen has no field or method SetContent) vendor/github.com/rivo/tview/box.go:291:9: screen.SetContent undefined (type tcell.Screen has no field or method SetContent) vendor/github.com/rivo/tview/styles.go:34:31: undefined: tcell.ColorDarkCyan vendor/github.com/rivo/tview/box.go:291:9: too many errors ``` Is this about Catalina? Thx and waiting any resolvation.
kerem closed this issue 2026-03-04 01:03:31 +03:00
Author
Owner

@shockw4ver commented on GitHub (Nov 26, 2019):

Emm... Cannot find SetContent in screen interface...
It this about version?

<!-- gh-comment-id:558423778 --> @shockw4ver commented on GitHub (Nov 26, 2019): Emm... Cannot find `SetContent` in screen interface... It this about version?
Author
Owner

@Bios-Marcel commented on GitHub (Nov 26, 2019):

You shouldn't expect people to help you right away. You are not paying them afterall :)

<!-- gh-comment-id:558497448 --> @Bios-Marcel commented on GitHub (Nov 26, 2019): You shouldn't expect people to help you right away. You are not paying them afterall :)
Author
Owner

@shockw4ver commented on GitHub (Nov 26, 2019):

Sorry for my expression.
Not mean that and pleased to got resolvation any time.
I'll delete the unpolite sentence that was typed unintentional.

<!-- gh-comment-id:558707440 --> @shockw4ver commented on GitHub (Nov 26, 2019): Sorry for my expression. Not mean that and pleased to got resolvation any time. I'll delete the unpolite sentence that was typed unintentional.
Author
Owner

@Bios-Marcel commented on GitHub (Nov 26, 2019):

So, it seems you have vendored your packages. Might that be related? Part of the vendored packages could be outdated.

<!-- gh-comment-id:558710526 --> @Bios-Marcel commented on GitHub (Nov 26, 2019): So, it seems you have vendored your packages. Might that be related? Part of the vendored packages could be outdated.
Author
Owner

@shockw4ver commented on GitHub (Nov 27, 2019):

Thx and it's true.
I ran dep ensure to import the github.com/gdamore/tcell package then got it on branch win2, it’s actually not up to date and screen.SetContent is undefined.
Should I do something to ensure the right branch?

<!-- gh-comment-id:558904157 --> @shockw4ver commented on GitHub (Nov 27, 2019): Thx and it's true. I ran `dep ensure` to import the `github.com/gdamore/tcell` package then got it on branch `win2`, it’s actually not up to date and `screen.SetContent` is undefined. Should I do something to ensure the right branch?
Author
Owner

@Bios-Marcel commented on GitHub (Nov 27, 2019):

Isn't dep legacy? Use go mod vendor

<!-- gh-comment-id:558963321 --> @Bios-Marcel commented on GitHub (Nov 27, 2019): Isn't dep legacy? Use go mod vendor
Author
Owner

@shockw4ver commented on GitHub (Nov 27, 2019):

So handy is go mod.
I should have read the document carefully... 😅
Appreciate your help!😄😄😄

<!-- gh-comment-id:558987581 --> @shockw4ver commented on GitHub (Nov 27, 2019): So handy is `go mod`. I should have read the document carefully... 😅 Appreciate your help!😄😄😄
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#272
No description provided.