A little while back I posted an issue about wanting to insert lines into a point within a text file. I have since resorted to the plan of feeding through the first 'x' lines from the original file into a Memo, adding lines of text that I want to insert and then feeding through the remaining lines from the file. Following this I am then allowing the user to re-save the file to its original place - using the syntax 'Memo1.Lines.SaveToFile()'. This seems to operate successfully when I am running the application within the IDE. When I then try to run the same build of the application outside of the IDE I am presented with the error 'Cannot create file .....'.
I'm obviously missing something here - can anyone suggest what it is ?
I'm opening the file using 'AssignFile()' and then 'Reset()', then reading the lines using 'Readln()'. Following reading the required 'x' lines, adding lines of text into the memo and then adding the remaining lines from the file (again using 'Readln()') I am then using 'CloseFile()'. Is there some other step I need to take or am I performing the wrong steps ?
Thanks in advance
Steve
I'm obviously missing something here - can anyone suggest what it is ?
I'm opening the file using 'AssignFile()' and then 'Reset()', then reading the lines using 'Readln()'. Following reading the required 'x' lines, adding lines of text into the memo and then adding the remaining lines from the file (again using 'Readln()') I am then using 'CloseFile()'. Is there some other step I need to take or am I performing the wrong steps ?
Thanks in advance
Steve