Can't Stop Procedure window from opening automatically along with db

Where can I get this 10.2?
Screen Shot 2021-09-02 at 5.24.48 PM

Panorama X 10.2 is currently only available to users that are part of the private beta program. Access to this beta program was included with the paid classes that were offered earlier this year, the details of which were sent out in emails last December and also announced here. Stay tuned for further announcements in the near future.

Ok, I am waiting, I am waiting, oh yea (tribute to Charlie Watts). I knew all that earlier stuff, but since you were suggesting 10.2 would solve someone’s problem, it seemed to me it might be on our doorstep as summer turns into fall. If 10.2 isn’t available, then of course it can’t solve our friend’s problem.

I did specify that it wasn’t available yet (highlight added to the quote below).

I know it’s been a long wait for 10.2, and it’s still not quite ready, though it’s getting closer and closer. I think it will prove to be worth the wait.


Jim - On 8/24 you suggested I try the following code for my Pan X system with multiple databases. I can’t get it to work and I can’t find help for it. “database” is an incomplete part of the help system and, according to the message I get, there is no such statement as “rectangle”.

This is probably a stupid question but I am lost. Can you please help me to untangle what you suggested?
Thanks – Jack

There is only one statement in that code – openform. “Database” and “Rectangle” are parameters to that statement.

Perhaps you’ll find it more clear if the code is rearranged as shown below. As described on the help page above, the openform statement has one required parameter, the form name. Then it can have additional parameters which must be supplied in pairs, the first parameter of the pair is the option name, and the second is the option value.

openform "Main Form",
    "Database","Database 1",

So this example has two pairs

  1. Database name (the database containing the form is “Database 1”, not the current database)
  2. Rectangle, which in this case is supplied by the rectanglesize( function.

The openform statement has 17 possible options. By specifying the options as name/value pairs, that allow you to specify only the options you need, and not have to always specify all 17 options (and remember what order they are in). In Panorama X there are quite a few statements that use option/value parameter pairs like this. (There were a few statements that did this in earlier versions, but Panorama X uses this scheme quite a lot.)

By the way, in earlier versions of Panorama the openform statement only had one parameter, the form name. Perhaps that’s what threw you off. You can still use this statement with just one parameter, in that case it works exactly as before. But now it’s much more flexible with the ability to specify up to 17 options when opening the form. Since the single parameter option is still valid, it’s perfectly compatible with existing Panorama 6 code.

In general, the way statement parameters work hasn’t changed since Panorama 2, but if you need to review this topic there is a short discussion on this help page. Basically parameters are supplied as a comma separated list following the statement name. When you see a comma, that indicates that there is another parameter to the statement, not the start of a new statement. There is no comma after the rectanglesize( function, so the next statement would start after that. In this example there is no next statement.

Thanks Jim,
What I am reacting to is a message in the yellow footer of my .Initialize procdure which says: “Unknown statement: Rectangle”. The procedure name, (.Initialize), when viewed in the procedure list in the View window is prefixed with a red bullet containing what looks like an exclamation mark. The procedure doesn’t run. I copied it exactly as you wrote it and have no idea where to get help for the problem except you :slight_smile: Sorry!
e.g. One line of my code is: openform “View As List”,“Database”,"Detail File,“Rectangle”,rectanglesize(20,20,250,600)
Thanks ~Jack

No, you did not copy it exactly. Fortunately, you did copy your code into your most recent post, so I can see that you have omitted a quote. That will produce exactly the error you describe. The code can be corrected by adding a " after "Detail File, like this:

openform “View As List”,“Database”,"Detail File",“Rectangle”,rectanglesize(20,20,250,600)

When you encounter a mysterious error, it’s always a good idea to look for mismatched quotes and/or mismatched parenthesese. In this case, Panorama is giving you a pretty good clue, as the missing quote is right before Rectangle.

Leaving out a quote or a paren will throw any programming language for a loop, an usually with a less than helpful error message because the programming language has no way of determining what your intent is. Programming languages are very picky and literal, that’s just the nature of the beast.

Also, be careful, you are mixing straight and curly quotes. That’s ok as long as you keep it straight and don’t mix quote types for each constant. In other words, these constants are fine,


but this one is not because it starts with a curly quote and ends with a straight quote.

“no good"

Thanks Jim. I have 4 instances of using that statement in my .Initialize procedure and this was the only one with a typo. Fortunate for me that I chose this one to send to you:)
The typo correction cleared the error message in the procedure window. The procedure still doesn’t work but maybe I can now figure out why.
Thanks ~Jack

If I open a Pan X dB as secret, what triggers it’s .Initialize procedure to run?

Can I have more than one secretly opened db’s simultaneously active?

Thanks ~Jack

The answer to this question is literally the first sentence in the documentation for the opensecret statement.

The opensecret statement opens a database without opening any windows or launching the .Initialize procedure.

Only one database can be active at a time. However, you can have as many databases open as you want (memory allowing), whether secret or not.

To make a secret database active, use the setactivedatabase statement.

So I guess that a db opened as secret will never run it’s .Initialize procedure unless I program a trigger for it.
I want my .Initialize procedures to run when the db is opened, I just don’t want the automatically saved window positions from the last time it was used.

The only way to open a procedure secretly is with a program. So you simply include whatever you want to run at .Initialization time in that program. That’s why I said some time ago that if you want to open windows secretly, you’ll need an extra database to do the launching.

The code you’ll need if you want to run .Initialize is like this:

opensecret "some file"
setactivedatabase "some file"
call .Initialize

Of course with this scheme you don’t have to use .Initialize, you can use whatever procedure you want or just include the necessary code in the “launcher” database.

Once a db has been opened as secret, is there any procedural or manual way to change it’s status to being non-secret?

I think you’re looking for the “makesecret” statement

Just the opposite. Openfile will make a secret file visible.

Thanks. I was under the impression that if I launched a db as secret, e.g. opensecret “Database 1”, it would remain secret. as I opened and closed it’s forms and procedures.
I’m trying to use the secret feature to keep it’s saved windows closed but sounds like a huge hassle.

There isn’t actually a “status” of a database being secret. A database may not happen to have any windows open at the moment, but there’s no “secret status”.

For example you wouldn’t usually say that your car has a “status” of being in the garage or a “status” of driving on an interstate. The location of the car isn’t normally considered to be an attribute of the car itself. The “status” changes when the car is moved, you don’t move the car by changing it’s status. Similarly, to change the “secret status” of a database you open a window.

Hopefully some concrete examples will make this clear. Suppose you have a database named “Contacts” that doesn’t have any windows open at the moment. If you want to open the data sheet, use this code:

setactivedatabase "Contacts"

If you want to open a form, you could use a similar technique:

setactivedatabase "Contacts"
openform "Labels"

You can do the same thing all in one line:

openform "Labels","Database","Contacts"

In either case, you could also add additional parameters, like the rectangle for the form, whether it should have scroll bars, etc.

If you want to open all of the windows that were open the last time the database was saved, you can use this code:

setactivedatabase "Contacts"

Here’s another way to do this:

opendatabase "Contacts"

This last example is slightly different, because if Contacts isn’t open, it will open it and then open the windows.

If you want to make an open database invisible without closing it, use this code:

setactivedatabase "Contacts"

The first line isn’t necessary if your sure that “Contacts” is already the active database (which is common).

Based on your previous messages I think openform is what you are looking for.