I was fighting since yesterday against a bad FolderItem and at last found (more or less) what happened
I stored into a Text file a Folder Name on line 1, a File Name on Line 2 (and a number on line 3). That text file is saved into ApplicationData/My_App/The_Text_File.txt
I get the My_App
Reference (FolderItem) from SpecialFolder.ApplicationFolder (and this works fine).
So, I read line 1 and build a FolderItem as a specific Folder Reference somethinglike:
DB_Folder_FI = Foo_FI.Child(Folder_TIS.ReadLine)
I do the same in a different variable with line 2 to build a file FolderItem. This part is always Nil.
Minutes ago, I found in the Debugger that this FolderItem is not a Directory as it normally is.
Of course, when I build a FolderItem to a file that resides inside that non folder, it goes Nil (as I saw in the debugger).
Extract of the debug part. Thye Foo variables are here only for debug purposes:
[code] Dim Foo_Str As String
Dim Foo_FI As FolderItem
Foo_Str = Prefs_TIS.ReadLine
Foo_FI = mSQL.gMaster_DB_FI // Was: mSQL.gMaster_DB_FI.TrueChild(Foo_Str)
Foo_FI = Foo_FI.Child(Foo_Str) // Foo_FI is Nil here[/code]
Idea ?