Hello and good year
I have several folders in which I read the Mequipe.txt file. I create a list of the result of reading files.
In the GotText block my list is correct and contains the elements. (1)I have 6 items read so 6 items in my list at the end of my loop
But once out of GotText my list is empty! (2)Just after the ReadFrom block the same variable has no more element
Text blocks are only used to display the content of the variable. I use different elements to be able to compare.
If I do "Do It" on the blocks, the values are the same. but in the execution of the program it tells me that the list is empty from (2)
Part 1: I recover the MEquipe.TXT files in each folder Equipe1, Equipe2, EquipeX, It works.
If I do a test with a notifier in the "GotText", the ListMaillot variable in 2 changes. it's good Part 3: I create my elements for a "ListView" and there the ListMaillot variable is empty in 4
It's impossible to load multiple files and handle their content in a single procedure.
The files arrive one by one, in their own events.
Set up a little factory floor of events and global lists or dictionaries to stash the incoming file contents in appropriate containers (dict/TinyDB) under a matching key/tag for later processing after the last of the files have completed their GotText events.
To feed the issuance of File Read requests one by one, you will need a global file name list to feed your File Read block one by one, deleting newly requested file names from the lists after their contents have arrived and have been stored separately.
Hi,
It's what i do, No ?
In part 1 it's my "little factory" and i save the result in ListMaillot (2)
the part 3 it's my process but ListMaillot (4) is empty
It's appropriate to a device that strives to juggle many tasks simultaneously and that allows its apps to also juggle simultaneous processes.
You don't want your app to go into little comas as it reads files, do you?
Anything that takes longer than a snap of your fingers should have a separate completion event, to allow your program or others to make productive use of the time between start and end of long (in computer time) processes.