Hi, I’ve just returned to xojo after a four-year gap and am having trouble understanding why the following code doesn’t work any more. I have a simple text file called “mytext.txt” inside folder2, inside folder1, which is in the same folder as the application I’m building. It works OK right up to the last item .child(“mytext.txt”) when I get a nil object exception. I’ve tried calling it just “mytext”, tried turning off “hide file extensions” in Windows 10 and tried making the file openable by xojo. What am I doing wrong?
[code]dim f as FolderItem
dim i as TextInputStream
dim linesArr(-1) as text
dim t as text
f = GetFolderItem("").Child(“folder1”).Child(“folder2”).Child(“mytext.txt”)[/code]