Making a PanX DB a login item causing problem

I created a shared DB for someone who records the time that the user clocks in. One person has reported a problem that seems to be related to the fact that the DB is a login item on his Macintosh account. (I have not been able to duplicate this problem on my computer.) The DB has a complicated .Initialize procedure that prompts the user to log in with his/her credentials, then checks if the person has already clocked in for the current day. If not, it asks with an alert sheet if they want to clock in. When they click the Yes button, a record is added to the DB.

The problem is that this user then gets the alert repeated after clicking Yes. But if they start the DB manually after the computer has started up, they do not see this behavior. I cannot find anything in the procedures that could ever cause this alert to repeat.

Does anyone know how the Macintosh starting up could interact with a PanX procedure to lead to some unexpected behavior like this?

Actually, I doubt I will ever know the answer, but maybe I will be surprised by someone more knowledgeable than I about the Mac.

It never even occurred to me that a document could be used as a startup item, but I guess it makes sense.

When they are doing this later, is Panorama itself already running when they double click on the database? I’m not saying that should make any difference, just wondering if the issue might be related to launching Panorama by opening a document or if the problem is definitely specific to opening as a startup item.

For my now obsolete Server Monitor that was the only way to be sure it was up and doing its job. But there are other chores I still assign to the copy of Panorama on a machine that is dedicated to running Panorama Server. Having it do a lot of Panorama Server’s work such as compiling requested reports, sending email and so on, can take a load off the server so it can be more responsive.

Barring the use of such a document as a start up item, is there any way to have Panorama as the startup item with it set to open specified files? Much like Autoload with past versions.

You could do this with a custom library. You could have code in the .InitializeHotKeys procedure that did whatever you want. I would probably suggest having the library actually run the code via a timer, or probably wait 0 would be sufficient, because you don’t want the code to run until after Panorama has completed it’s initialization. Or maybe even wait 1 would be a good idea.

Also you would probably want to check whether you were running on the server or not. You should not open databases yourself for the server version.


All that being said, I think it’s probably fine to make a database as a startup item. Especially if that database doesn’t automatically prompt the user when it opens (which is a practice I frown on anyway).

The problem only occurs if the file is opened as a login item; it works as expected if opened by doubleclicking the database (which also starts PanX.) The problem forces the user to make one or two extra clicks, so I do not intend to spend any more time on it. They could remove the DB as a login item, but they prefer to put up with the extra clicks.

Perhaps I can develop an automator script that can run as a log in item, which could delay the DB opening slightly, to see if that fixes the issue. But I have very little knowledge about automator.