File naming: .pan or not .pan


#1

I have yet to figure out the .pan thing. I’ve been frustrated by the Open Recent… so often failing to be able to recognize previously used files. Thus, I have recently been adding the .pan extension to files in the Finder. Then Open Recent… finds them and opens them correctly. But now, I’ve just renamed a file with the .pan extension and it opens fine but in its data window title bar, it says FileName.pan while other files do not show the .pan extension.

What is the proper or least problematical way to handle the .pan file extension naming scheme?

And when sharing the file via Enterprise, how should the file name appear in the Server Database Name field?


#2

Not sure if this will help Robert but I ran into a similar problem with the .pandb extension in Panorama X (and I share your confusion in both versions). In my case, the extension tripped up the fileexists( function so I used a construct like this:

If FileExists("",FileName2) = 0 and FileExists("",FileName2+".pandb") = 0

and had no more problems.


#3

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.


#4

Having read all of the above, I continue to be baffled. The regular (perhaps not always but way too often) experience of Open Recent… providing me with a 'No Such File exists (or That file can not be found) or some such verbiage, caused me to try things. I found that if I merely added the .pan, they opened regularly. I was happy. But now, the adding of .pan resulted in the Title Bar showing it again told me that I was not on that perfect path I desire. And yes, I too always turn on extensions. It tweaks my clients but I know it is for their own good. :wink:

As for the Enterprise name, yes, I worked extra hard to get that .pan dropped off as it kept reappearing even after I removed it.


#5

This will definitely happen if a file has been renamed in any way (including adding or removing an extension) or moved since the last time the file was opened. The Panorama 6 Open Recent wizard remembers the exact path and filename of each opened file, so if that has changed, you’ll get that message. In that case you have to manually open the file, then Open Recent will remember it again (though the stale old entry is still there unless you manually delete it).

Panorama X uses Apple’s Open Recent tracking which works even if the file has been renamed or moved.

That makes no sense to me, Panorama does not ever modify that. However, when you set the server name that it only affects the local copy on that computer. If you go to a different computer you won’t see that change, unless you copied over the file.


#6

I got by without extensions for years and I still don’t have the Show all extensions option switched on (although I take your recommendation to heart). The file’s icon tells me what sort of file it is.


#7

I normally use the Finder’s list view, it can be hard to tell what the tiny icons are. And in some cases, the I may not recognize what the icon is.

In Mac OS 9 (and earlier) there generally were no file extensions (except for industry standards like .html, .jpg, etc.). Each file had a hidden code that specified the type of file, and what icon to draw. That was a nice system, but Apple decided to move away from that when they switched to OS X. In that older system, it was not possible to have two files with the same name but different types.

Internally, the extension is really part of the filename. Apple is simply hiding that information – they think that extra information would be confusing. In my opinion, having information hidden from me is confusing. For example, I could appear to have two images named “flower” – a jpg and a png. To me that is confusing if the extension isn’t shown. (For that matter, I’m not sure what the icons for a jpg and a png file are – are they even different? Hmm, just checked that on my system and both are the same, they show a tiny preview of the image. So that would be confusing (at least to me) without the extension being visible.)