I don’t know of any reason why Open Recent would care one way or the other about the .pan extension (remember, we’re talking about Panorama 6). I have a mix files with and without the .pan extension, and they all work fine in the Open Recent window.
That should not happen. Are you sure the file name isn’t something.pan.pan? That’s the only way I can imagine the results you are describing.
BTW, I always recommend turning on the Finder preference Show all filename extensions. Unfortunately, that is not the Apple default. I wish there wasn’t even an option to turn off this option. If you have two files with the same name but different extensions (for example flower.jpg and flower.png) how are you supposed to know which is which if this option is turned off? Doesn’t Apple think seeing two files with the same name will be confusing to users?
No extension. When a file is open in memory, it doesn’t have an extension. So myfile.pan is just myfile for statements and functions that need the name of an already open file.
When referencing a filename on the disk (not open in memory), the extension is required. Since Panorama X databases must always have the extension, you don’t need the check without the extension (unless you wanted it to match a Panorama 6 file you might have hanging around without an extension).
if fileexists(FileName2+".pandb") = false()
Notice also that in Panorama X the fileexists( function only needs one parameter – the folderid parameter is not required. It’s still available for compatibility with old code, but I would never use it in any new code, it just adds unnecessary complication.
If you need the name of the current database on disk, use the info(“databasefilename”) function. This will automatically add “.pandb” to the name.