mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #55] Quick silly question #40
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Feb 9, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/55
Oh what the heck. Sorry for the silly question, but if you can find a minute to answer I would really appreciate it:
It's not at all obvious to me how to get the value the user inputs for the Name input field, in below simple snippet. Can some please put me out of my misery?
https://stackoverflow.com/questions/48715418/getting-the-actual-form-values-when-using-tivo-tview-golang-library
@ghost commented on GitHub (Feb 10, 2018):
Nevermind. The StackOverflow questions was answered.
fmt.Printf("%s\n", form.GetFormItem(0).(*tview.InputField).GetText() )Thanks
@rivo commented on GitHub (Feb 10, 2018):
Not a silly question. ;-) The Stack Overflow answer is correct. And I'll add that instead of reading out the text at the end, I usually register all changes to an input field:
In this solution, you don't need to cast or know the index of the input field.