[GH-ISSUE #637] Having a select from list issue #466

Closed
opened 2026-03-04 01:05:15 +03:00 by kerem · 1 comment
Owner

Originally created by @r3k2 on GitHub (Aug 28, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/637

I am new to TUI and of course tview, so sorry for the noob code.

The code I am talking about is here: https://git.sr.ht/~rek2/golisten2music/tree/tui/item/main.go

I manage to get most of it working, I am migrating another go app I had into tview and I have 2 main issues reminding that I can't see to be solved by reading others code to learn.

  1. when I populate the list, I add a func call to when is selected, good. but as soon I move focus to the list it runs before I actually move around the list...
  2. when I am done watching a that video above and close the external app, go back to the list and try to select another video, and it will focus on search again instead of selecting the item and running the func again.
    I know this may be super silly stuff but I will learn a lot from the opinions and tips I get.

thanks in advance.

Originally created by @r3k2 on GitHub (Aug 28, 2021). Original GitHub issue: https://github.com/rivo/tview/issues/637 I am new to TUI and of course tview, so sorry for the noob code. The code I am talking about is here: https://git.sr.ht/~rek2/golisten2music/tree/tui/item/main.go I manage to get most of it working, I am migrating another go app I had into tview and I have 2 main issues reminding that I can't see to be solved by reading others code to learn. 1. when I populate the list, I add a func call to when is selected, good. but as soon I move focus to the list it runs before I actually move around the list... 2. when I am done watching a that video above and close the external app, go back to the list and try to select another video, and it will focus on search again instead of selecting the item and running the func again. I know this may be super silly stuff but I will learn a lot from the opinions and tips I get. thanks in advance.
kerem closed this issue 2026-03-04 01:05:15 +03:00
Author
Owner

@r3k2 commented on GitHub (Aug 30, 2021):

I was able to figure out prob in a very hackish, dirty way but works.

<!-- gh-comment-id:907953186 --> @r3k2 commented on GitHub (Aug 30, 2021): I was able to figure out prob in a very hackish, dirty way but works.
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#466
No description provided.