April 13, 201114 yr I am playing around with the File class, and I am trying to create files immediately in a container, without being created on the hard disk (just as an experiment, don't have a real goal yet:) ) I wrote the following lines of code: def myFile = new File ( "test.txt" ); myFile << "First Line Of text"; return myFile; When I run this 2 times the result is a text file in my container containing two times the line "First Line Of Text". When a run it three times it contains it three etc etc. (I guess you all get the picture) I know that the command "<<" will append the text if the file already exists, so this means to me that somewhere in the memory the variable "myFile" is still alive... So I created the following lines of code: def myFile = new File ( "test.txt" ); myFile << "First Line Of text"; def myResult = myFile; myFile = null; return myResult; But I have the same result. I restarted FileMaker, used the SMReset function, but it is always the same behavior. What is going on in this piece of code?
Create an account or sign in to comment