The passed FolderItem to a Read_Text Function is Nil or does not exists.
So I add a call to the Function from the main window to a Text file in the project folder: the Function returns the txt file contents as requested.
“Direct” call:
Dim f as New FolderItem("List of Stories.txt")
TA.Text = f.NativePath + EndOfLine
TA.AddText Read_Text(f)
In this case macOS ask me for the permission to read, not with the code below.
Call in a method, different window:
Dim f As New FolderItem("Sunday Area")
f = f.Child("Contents")
f = f.Child("14PM the Mysterious Maiden”")
f = f.Child("Rules of the game.txt ")
TA.Text = f.NativePath + EndOfLine
TA.AddText Read_Text(f)
REMEMBER: this is bulk code, used for debug purpose.
14 posts - 3 participants