[GH-ISSUE #365] Iteration difficult on form values. #271

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

Originally created by @stephen-mw on GitHub (Nov 11, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/365

It's possible I'm missing something obvious for a retrieving a list of items in Forms. Currently the f.items array isn't externally accessible, which means when I need to for-loop over the form items via f.GetFormItem(N) and catch the out-of-index panic (or, keep a secondary index of things added to the form).

If I'm not missing something obvious, please accept my PR, which makes it easier to do loops on the items by exposing the len of available form items.

Originally created by @stephen-mw on GitHub (Nov 11, 2019). Original GitHub issue: https://github.com/rivo/tview/issues/365 It's possible I'm missing something obvious for a retrieving a list of `items` in `Forms`. Currently the `f.items` array isn't externally accessible, which means when I need to for-loop over the form items via `f.GetFormItem(N)` and catch the out-of-index panic (or, keep a secondary index of things added to the form). If I'm not missing something obvious, please accept my PR, which makes it easier to do loops on the items by exposing the `len` of available form items.
kerem closed this issue 2026-03-04 01:03:31 +03:00
Author
Owner

@stephen-mw commented on GitHub (Nov 11, 2019):

Looks like there's an existing fix in PR 298

<!-- gh-comment-id:552568815 --> @stephen-mw commented on GitHub (Nov 11, 2019): Looks like there's an existing fix in PR 298
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#271
No description provided.