I have a listbox containing the names of pdf files in one of the columns. The user needs to open one of these when running the app. There are about 150 rows, so 150 different pdf files. All are in the same location.
The majority of the files open ok as expected, but there are about 25 which do not open, even though they are there, and open ok from Finder with my default pdf reader (Adobe Reader).
When a file fails to open, I get this IO Exception:
The application “[correct filename here].pdf” could not be launched because a miscellaneous error occurred (OSStatus -36).
The code which opens the pdf file is this, in a separate Method:
Var ns as String
ns = str(StartWin.TitlesLB.cellvalueat(StartWin.TitlesLB.selectedrowindex,3)) 'pdf
Var pdf as FolderItem = Specialfolder.Desktop.child(“Xojo Projects”).child(“HPC Mk 2 with DB”).child("[subfolder for the pdf files]").child(ns)
if (pdf.Exists) AND (pdf <> nil) then
I wonder if anyone can point me in the right direction to solve this? I wonder about that Miscellaneous Error!
Thanks in advance