PanX switches to Panorama X Server Menu Bar!

I have seen this strange phenomenon perhaps 3 times, but I can’t reproduce it. At some point the Menu Bar Appears as the Panorama X Server! Here’s a screen shot. If I just close the databases, I am left with just two menu items, Panorama X Server and Debug. I do have Pan Server visible in the dock. The only way I have found to escape this condition is to tell the server to Quit. While this is going on, Panorama X itself does not showing its icon in the dock, and Activity Monitor shows Panorama Server Running but not Panorama itself. I can still open a database, but they are not acting normally.

I am running 10.2.0 b5 (3265). Hopefully I will figure out what steps lead to this condition.

After reading your post, I did some experimenting. I found two ways I could get a database to incorrectly open in Panorama Server.

  1. I could drag the database from the Finder onto the Panorama X dock icon. I doubt this is what you are doing.

  2. If Panorama X Server is running, but Panorama is not, double clicking on a database incorrectly opens the database using Panorama Server. I suspect this may be what you are doing, what do you think? Once opened that way, a database is definitely not going to work normally, that is intentional.

If both Panorama X and Panorama X Server are both running, it correctly opens in Panorama, at least in my tests. However, it’s macOS that decides what app to launch when a database is double clicked, not Panorama. So I need to make sure that macOS will not launch the server when double clicking, but still allow Panorama Server to open databases under program control. I thought I had taken care of that over a year ago, but apparently not.

This is a problem I most likely would never have found on my own, for two reasons. Most importantly, I never double click a Panorama document to open it. My computer has dozens of copies of Panorama, so who knows which one macOS would decide to use! So I always open databases by dragging them to a specific Panorama app (usually in the dock). But obviously that is not the way most users operate.

The second reason is that I pretty much never run Panorama Server without also having a copy of Panorama open. Again, certainly many users will do this, so I am not a good test case here. Thank you for bringing this to my attention, and if you come up with any additional useful information please let me know.

So I’ve been pouring over the Apple documentation and it appears that I DID make the changes that were supposed to prevent Panorama X Server from opening documents. But it doesn’t work. It might be an Apple bug. For now I’m stumped. I know an ex-Apple employee that I can ask, not sure if he will know the answer but it’s worth a try.

I was able to make a change in the code that prevents databases from opening on the server version. That sounds like a fix, but it isn’t complete. If only the server version is open, double clicking on a database will still bring Panorama X Server forward. The database doesn’t open in server, but it doesn’t launch Panorama X client and open the document either, which is what a complete fix would do. But as I say, I am stumped. But it’s a bit better for now.

Originally I had not seen this problem because I put the server on my wife’s computer and ran it over the network. I recently stopped that server and just opened it on my own computer, so I now have the server on the same computer as the databases.

I found a variation of the above-described problem. This morning I checked: server running, panorama not running. I clicked a database alias in the dock. The database window opened with NO menu items, neither Panorama nor the server. According to Activity Monitor, server running and Panorama not running.

I usually open Panorama this way: click the alias in the dock. (That’s my Navigator app, that builds a list of all the databases in the folder and puts it in a drop down menu–to make it easy for users.)

Once in this condition, if I double-click an app, it opens with no menus. Now I am not sure how I got the Panorama X Server Menu to appear.

Also by dropping the database on the Panorama icon in the dock, Panorama opens normally.
When looking at the Get Info window for a database, it still says open with (default), but it also lists as an option (is that the server?)

In my test at Smith Duggan, the server will be running on a separate computer, so I do not expect this issue to arise.

From the system’s point of view, that is exactly the same action as double clicking on the database in a Finder window. So I’m not surprised the same thing happens, in fact, I would have been very surprised if something different happened.

Let me make a point that will sound nitpicky, but will help in our communication, as this complicated topic is fraught for possibilities for misunderstanding. As a developer, a Panorama database file is considered a document, not an app. An “app” is a program that runs on it’s own, containing it’s own machine code. So is an app, and is an app. A “.pandb” file is a “document”. A document is a file that doesn’t operate on it’s own. but operates in conjunction with an app. Using this terminology will help me reliably understand what you are describing.

I realize this is confusing because from your point of view Panorama databases do contain code, but from the system’s point of view they don’t. The system doesn’t understand the code in Panorama, in fact the system isn’t even aware that this code exists (it’s not machine code that is understood by the processor chip, like code generated by Xcode). Only the Panorama app itself understands that code.

it opens with no menus. Now I am not sure how I got the Panorama X Server Menu to appear.

No menus at all? Not even an Apple menu? I haven’t seen that. But it wasn’t designed to be used this way, so I suppose anything is possible. I think the change I made last night will prevent this.

Good, that is what I would expect and what I see here also.

That is not the server. Have you ever by any chance made a copy of the and given it the name

Now that I am aware of this, I am sure that this is going to bite some users. Wanting to run the server on the same computer that is being used for client use is a common request, and often the user will be a non-expert user that can’t be relied on to open files in some special way. So I am very concerned about this over the long run. However, I am also starting to fear that this may not be fixable without a massive internal change to Panorama Server. I did hear back from my ex-Apple friend and his response wasn’t super encouraging. The fix I made last night will at least prevent a database from opening accidentally in the server app, but it will still allow confusion since the database won’t open in the client app either in some situations (like double clicking or clicking on a database icon in the dock). I haven’t given up yet, but I’m grasping at straws at the moment. It’s quite possible that Apple hasn’t provided for this situation.

I understand and agree with you completely about being careful with the terminology. I don’t consider it nitpicky. I will be more careful.

I had forgotten that when you sent me the first release with the server, I copied and renamed it I have now deleted it.

Regarding lack of any Panorama menus, I have not been able to reproduce this; I will try again tomorrow and see if it recurs.

I agree that the issue of opening a database with the server instead of the Panorama app is a serious issue, even though I have a way to work avoid it. Good luck with find a solution.

I’m giving up on this for now. My ex-Apple friend didn’t have an answer. This would be a good question to ask at WWDC labs – if there was going to be a WWDC this year, and if I won the lottery to get a ticket. I’ll keep this in mind if somehow I get a chance to contact an Apple engineer someday. And who knows, maybe someone will answer the Stack Overflow question I posted about this (other than Peter, my friend).

In the meantime, I have managed to get it to beep and display a notification when this happens, and it doesn’t open the database. So it will still confuse people, but it won’t mess up the server, and there will at least be an error message telling them something is wrong.

Napkin 8 04-10-20, 3.22.19 PM

Good news on this, it seems to be licked. I gave some clarifications to my ex-Apple friend and he came up with the exact clue to the problem. So when the next beta comes out, double clicking on a database, or clicking on a database in the dock, will never launch the server. Yeah!

While it’s fresh on my mind, you may have to clear your Launch Services cache after you install the new beta to get the Finder to recognize that Panorama Server shouldn’t be used to open Panorama databases. You can do that from Launch and then run this command:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

This may take a while to run.

You may also need to restart the finder with this command:

killall Finder

and restart the dock with this:

killall Dock

Don’t do any of this now, wait until after installing the next beta. But I’m posting this now while it’s fresh in my mind.

Excellent. This will avoid a lot of trouble and annoyance.

I am starting the Smith Duggan testing today; we have training this afternoon for the three participants.