I am trying to parse a large text file using TW in the browser. I already know how to process text files using .Net, I enjpy learing what programmatic capabilities are available in every environment I pick up.
The text file is simple enough to find records using splitregexp[/n] . However, I know this particular file has a unique key for each record. I am able to convert the file using .Net into a json file describing a DataTiddler that I can import. This way I can reference each record by its primary key. If there was a way to auto-number the list entries and persist them to a DataTiddler, this would be close enough for me to selectively process the records further without having to re-split the original list over and over.
I saw several requests for adding a variable to the ListWidget, calling it an iterator (Tobias) or addposition (Evans) on GitHub issue 3384. It was closed as duplicate of issue 1523. Both issues mention concerns over how the ListWidget creating a variable would actually cause re-rendering.
Instead of modifying the ListWidget directly, I was proposing an intermediate step of preprocessing a list into a DataTiddler with auto-numbered indexes. Then you can iterate over the DataTiddler indexes to get the list position and use getindex to return the record.
When trying to use the iterator feature in a loop to call a set-field action on a DataTiddler for each record, the button code generated can end up being huge. I would just like to internally side-step the generating of so many individual actions in the button. It would be like a 'copy tiiddler text to DataTiddler' action with a list process in the miiddle and auto-number on the insertions.
Just saying that out loud sounds like I'm probablly barking up the wrong tree, because TW lists are not designed as an imperitive language. DataTiddlers as an internal database table seem to work well as long as the tables are generated outside of TW.