Thanks Jim. Damn bugs anyway! Where’s my can of Raid? The letfileglobal worked but I was hoping to streamline and minimize by utilizing makefileglobals to make a bunch of them. Oh well.
I’m about to run off to the dentist so I didn’t do a deep dive into makefileglobals, but I had a hunch that it might be a bug there. The letfileglobal statement works completely differently, it should work fine for you.
letfileglobal NumberofTeams = superlookup(...)
I would recommend using letfileglobal in any new code, instead of makefileglobals.
I just ran across another problem with makefileglobals. If you try to use it in a .PreInitialize procedure it will make the file unusable. The file will evidently be opened but nothing will show and if you try to use the Open View wizard to open a procedure or form it will give an error message and not open anything. I tried with only one entry in the makefileglobals statement and it showed the same result. I ended up converting my batch of 54 variables from the makefileglobals statement to each using the letfileglobal statement and it worked perfectly.
One additional note: this action is only noticed if there are no other files currently opened when you try to open the file or if you try to open Panorama by double clicking the file in the Finder. If another file is already open in Panorama it will open the file with the makefileglobals in the .PreInitialize procedure without a problem. I thought possibly the set command in the makefileglobals procedure was causing the problem so I simplified the code to
but this had no effect on the anomalies. I then thought the execute command might be the problem but that worked fine with other executed code and even commenting that command out of the makefileglobals procedure made no difference. The only other culprit I would suspect would be the «_RawParameters» variable??