Custom Functions

Hello Everybody,

Currently, I have a registercustomfunction command in EACH of the files that need that function. That was a suggestion Jim made to me last year when I asked about this.

But now I want to have that custom function available automatically to any database that calls it. I’ve tried to follow the “Help” instructions on how to do this, but apparently, I am not understanding something.

Here is what I am doing. What am I doing wrong?

1- In my PanoramaX/Libraries folder is a database called “Custom Statements.pandb”. I didn’t actually create that database, but there it is. I added a new procedure in that database called “.initializefunctions”. By the way, there was already a procedure called “Custom Statements” in the file, with commented information, but no actual code. I did not enter that procedure, but there it is.
2- In the new procedure (".initializefunctions") I entered my registercustomfunction command. It is the same command which works correctly when entered into a database, so I am sure it is formatted properly.

With my (obviously incorrect) understanding, that procedure should run automatically whenever Pan X starts, and my function should be available. But if I quit Pan X, and restart it, the function is not recognized. The Formula Workshop window indicates “unknown function”.

Exactly WHERE does one write the registercustomfunction command?

A very, very frustrating side issues is - SOMETIMES when I double-click the Custom Statements.pandb, a window of the DB opens. But OTHER times, no window opens. Nothing appears to happen, and the Window menu shows everything greyed out. Pan X is loaded, but no windows.

Very confusing. And very frustrating.

The name is case sensitive. It should be .InitializeFunctions

Dave, you are precious!!!

If that file was in your Library when you started Panorama X then it is already open in secret with no windows showing. If, on the other hand, you did not have it in your Library folder then it would open normally with whatever windows were open when it was last saved. If it is open secretly you can go to the Open View… item from the View menu and check that wizard by having the Libraries option checked and search for “Custom Statements”. You should see a listing for the procedure from your secret file and double-clicking it will open that procedure window.

Gary, when the database file is secret there is no “Open View… item”, and no “View” menu. If I choose “Find & Open” from the File menu, the database is listed but clicking on it just reopens it as secret. I still don’t see how to “Open” a secret file.

38 PM

Temporarily open a new empty database and you will get the View menu.

TWO precious people!!