My objective: To read through a file & check for anomalies, if anomaly found, query user if a change is required; if yes, get the change and update the file record.
Process used:
1. Read the file into an array
2. Check the records in the array
3. If anomaly found in record
4. Query user with Tk Dialogue box
5 get users answer to query
6 if user wants a change, activate a Tk entry box
7 get users change from entry box, via the Tk associated subroutine
8 update the record in the array
9 back to 2. for next record in the array
10 at end of array rewrite file from array.
My problem is that Step 9 processes before steps 7 & 8 complete, (or even start).
How can I force steps 7 & 8 to process before step 9.
TIA,
Colin