My Invoices file opens my Advertisers file, and vice versa. In the .initialize procs of both files, I have an openfile statement that opens the other file. This was used in Pan 6 so that both files would be open no matter which one the user opened first. It has worked fine for years, and it was working in Pan X, until recently.
I assume that openfile (and opendatabase) will run the .initialize when the file is first opened but NOT if the file is already open. I’ve used it for years just to switch between files.
I began getting an error when the files opened up, and so far this is what happens. The code below is in the Invoices file. I started getting an error: fgItem1popup doesn’t exist when the files opened up and .initialized. But if I add in a Message statement, there is NO error, and everything works fine, after clicking the Message OK button. The variable is loaded correctly.
Also, I changed openfile to opendatabase to see if it would help, but it acts the same.
let mainwin = info(“windowname”)
OpenSecret “Price Master”
message mainwin // Remove this and the error occurs in the following
fgItem1popup = arraybuild(¶, “Price Master”, “«Type»”)