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.