Whats wrong with this picture?

Been using RS/Xojo for a few years now and I can’t believe I have to ask this question. The following code is failing with a nil object exception. No matter how I re-write the path the program fails on the “ti=TextInputStream.Open(fi)” line. The path is legit as is the file I am trying to open.

fi=GetFolderItem(“C:/SOFTWAREDEV/TEST/CONFIG.txt”)
ti = TextInputStream.Open(fi)

Try making your slashes backward. Like Windows.

Fixed it

and pass a folder path type as second parameter. That may help.

Also, test first:

if fi <> nil and fi.Exists then ti = TextInputStream.Open(fi) … end if