Text Import Mystery

I have a database with an import procedure that is working perfectly on my computer to import text files. On another user’s computer it imports nothing using the very same text files.

On his computer, trying to use the Text Import Wizard it claims no text was detected. On mine I can’t get the same message even if trying to import a JPEG.


He can right click on the very same text file and choose Open With… Panorama X and it imports and can then be transferred to the intended database.

The file shows on his Desktop as a text file, permissions allow Read and Write, etc.

If he sends me the text file, I can import it just fine.

I’m stumped on what the issue might be.

Maybe the other user should use an utility like OnyX to rebuild some System databases: e.g. LauchServices, dyld’s Shared Cache, XPC Cache.

Here is the code in the Text Import wizard that can generate this error:

local dropFileName,dropData
dropFileName = info("dropfiles")
if dropFileName contains cr()
	nsnotify "Cannot import","TEXT","Only one file can be imported at a time."
dropData = binarytotext(fileload(dropFileName))
if error
	nsnotify "Cannot import","TEXT","Dropped item does not contain text."

So either the fileload( or the binarytotext( function is returning an error. I think it must be the fileload( function. I don’t know why there would be an error if the file works in other uses though. Maybe there is an ACL problem? I’m not really an expert in that area. What if he moves the file to a different location, not the desktop? Is it just this one file that is a problem? Can he drop to import other text files?

I guess this code should separate the two functions into separate lines of code, and display the actual error message instead of just saying “does not contain text”.