[GH-ISSUE #10] Cannot run demos/presentation #6

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

Originally created by @carlca on GitHub (Jan 11, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/10

First of all, I have to say this is a cool looking library with some neat code. The demos all work well apart from the one in demos/presentation. I CDd into the folder and ran go run main.go but i got the response:

# command-line-arguments
./main.go:35:3: undefined: Cover
./main.go:36:3: undefined: Introduction
./main.go:37:3: undefined: HelloWorld
./main.go:38:3: undefined: InputField
./main.go:39:3: undefined: Form
./main.go:40:3: undefined: TextView1
./main.go:41:3: undefined: TextView2
./main.go:42:3: undefined: Table
./main.go:43:3: undefined: Flex
./main.go:44:3: undefined: End
./main.go:44:3: too many errors 

I expect I have inadvertently missed out an important step. But which one?

Originally created by @carlca on GitHub (Jan 11, 2018). Original GitHub issue: https://github.com/rivo/tview/issues/10 First of all, I have to say this is a cool looking library with some neat code. The demos all work well apart from the one in `demos/presentation`. I CDd into the folder and ran `go run main.go` but i got the response: ``` # command-line-arguments ./main.go:35:3: undefined: Cover ./main.go:36:3: undefined: Introduction ./main.go:37:3: undefined: HelloWorld ./main.go:38:3: undefined: InputField ./main.go:39:3: undefined: Form ./main.go:40:3: undefined: TextView1 ./main.go:41:3: undefined: TextView2 ./main.go:42:3: undefined: Table ./main.go:43:3: undefined: Flex ./main.go:44:3: undefined: End ./main.go:44:3: too many errors ``` I expect I have inadvertently missed out an important step. But which one?
kerem closed this issue 2026-03-04 01:01:03 +03:00
Author
Owner

@rivo commented on GitHub (Jan 11, 2018):

The presentation code is spread across multiple files. go run *.go should do the trick.

<!-- gh-comment-id:356969437 --> @rivo commented on GitHub (Jan 11, 2018): The presentation code is spread across multiple files. `go run *.go` should do the trick.
Author
Owner

@carlca commented on GitHub (Jan 11, 2018):

Wow! That was quick! Thanks.
Just one thing now, I seem to be stuck on Page 7 "Text 2" - no key that I can find moves the page forward or back.

<!-- gh-comment-id:356971519 --> @carlca commented on GitHub (Jan 11, 2018): Wow! That was quick! Thanks. Just one thing now, I seem to be stuck on Page 7 "Text 2" - no key that I can find moves the page forward or back.
Author
Owner

@carlca commented on GitHub (Jan 11, 2018):

I obviously didn't try escape. How embarrassing!

<!-- gh-comment-id:356972741 --> @carlca commented on GitHub (Jan 11, 2018): I obviously didn't try escape. How embarrassing!
Author
Owner

@rivo commented on GitHub (Jan 11, 2018):

It's not obvious, I admit. But since the primitives that are shown are interactive and they have their own key bindings, sometimes Enter has a different meaning.

I actually built in a short cut: Hit Ctrl-N to advance to the next slide, Ctrl-P for the previous slide.

<!-- gh-comment-id:356976887 --> @rivo commented on GitHub (Jan 11, 2018): It's not obvious, I admit. But since the primitives that are shown are interactive and they have their own key bindings, sometimes `Enter` has a different meaning. I actually built in a short cut: Hit `Ctrl-N` to advance to the next slide, `Ctrl-P` for the previous slide.
Author
Owner

@carlca commented on GitHub (Jan 11, 2018):

Great. Thanks for that. It's a really impressive library. I've tried a few CLI tools with Golang but this one looks easier to use, with a nice fluent approach, and your color choices are good!

<!-- gh-comment-id:356979442 --> @carlca commented on GitHub (Jan 11, 2018): Great. Thanks for that. It's a really impressive library. I've tried a few CLI tools with Golang but this one looks easier to use, with a nice fluent approach, and your color choices are good!
Author
Owner

@lhanson commented on GitHub (Sep 21, 2019):

Maybe a Readme could be added to the demos subdirectory pointing out the convention of running *.go? I ran into the same issue. Maybe it's only an issue for people new to Go, but as a person relatively new to Go looking to use this library, it did introduce a tiny amount of friction.

<!-- gh-comment-id:533812326 --> @lhanson commented on GitHub (Sep 21, 2019): Maybe a Readme could be added to the `demos` subdirectory pointing out the convention of running `*.go`? I ran into the same issue. Maybe it's only an issue for people new to Go, but as a person relatively new to Go looking to use this library, it did introduce a tiny amount of friction.
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#6
No description provided.