I have a poor english, so I apologize if I'm a bit hard to understand.
I try to set up a standalone app dealing with bank accounts and stuff like this.
On opening the stack I want to get the contents of text files : comptes.txt, ventilation.txt, lignes.txt, detailscomptes.txt; those files are beside the app.
Here is the code :
Code: Select all
on lectureFichiers
-- on lit les fichiers de données
open file "comptes.txt"
read from file "comptes.txt" until EOF
put it into field id 1214 of card "init"
close file "comptes.txt"
open file "detailscomptes.txt"
read from file "detailscomptes.txt" until EOF
put it into field "listecomptes" of card "paramètres"
close file "detailscomptes.txt"
open file "ventilation.txt"
read from file "ventilation.txt" until EOF
put it into field "ventilation" of card "paramètres"
close file "ventilation.txt"
open file "lignes.txt"
read from file "lignes.txt" until EOF
put it into field "lignes" of card "paramètres"
close file "lignes.txt"
end lectureFichiers
If I debug step by step, the "it" variable stay empty after a read from file command ?