Odd loss of lookup( capability


#1

A glitch in code caused a file to think I wanted to close it. The dialog asked me if I want to revert changes, review them, or cancel, as usual. I cancelled because this is not what I meant to do, and my file remained open. But as of that moment, all lookup( functions in other files that referenced this one now say that file is not open (and of course can’t retrieve any information from it). Is there any way to re-establish the connection that should not have been broken short of restarting the whole file set? This would appear to be a bug.


#2

I can confirm the behavior. It sounds like Panorama is dropping the file from its list of open files, while you still have the option to cancel.

message info("files")

Doesn’t list the file after I have clicked the close button, and then canceled.

I don’t see why it would be necessary to restart the whole file set. Closing, and reopening the file it thinks is closed should be enough.


#3

Yes, that would likely do it, but the file that is thought to be closed is the main file in my set, and it will execute a bunch of stuff in its .Initialize if I restart it, including reloading the entire file set, that I’d rather not do again in this situation. That’s what makes this particular situation beg for a different solution. Whether there is a way to restore its status to “open” or not, it’s probably a fairly easy bug fix for the future.


#4

As long as that file is currently open, you could remove the dot from the name of the .Initialize procedure before saving and closing. Then, when you reopen, you put the dot back.

Or just comment out the part that opens all those other files, if some of it will need to be redone when you reopen.


#5

Could someone explain to me exactly how to duplicate this? It sounds like a bug but I don’t know how to duplicate it. I suspect that I need to change a preference on my system as I never get a dialog when I close a database.


#6

I just created two databases named DB1 and DB2. After making a change to the content of one cell in DB1, I clicked the close button in the upper left corner in the window, and when the dialog appeared, I canceled. A procedure in DB2, which tried to do a simple lookup, reported that DB1 was not open. Info(“files”) reported that DB2, and the Help file were open, but not DB1.


#7

Funny thing about that. When I go to Open View to bring up .Initialize, all I see is a big ! in a blue circle, indicating that it can’t show anything about a file that isn’t open. Another bug path.

So I looked through the very long list of procedures the old fashioned way and found .Initialize. I removed the dot, did File>Save, and closed the file. When I opened it again, it did a lot more than “nothing” and when it was finished I find that the dot remained in front of Initialize, so it executed anyway. So even that isn’t the full solution. But I can wait for the bug to be fixed, I don’t expect to be in this situation again.


#8

I’ve filed a bug report – this is a general problem and the lookup( problem is just a symptom. For now, don’t press the Cancel button in this alert, if you need to, go ahead and close the database then reopen it.


#9

This just happened again, and my “glitch” may in fact indicate another bug. This is the same way I got into this situation in the first place.

I have my main database, with one (form) window open. I click on a button that opens another form for the same database in a separate window. That form has a button titled “Save and Close.” When I press it, it executes a 2-line procedure that is in the button properties.

call ".AddTo History"
CloseWindow

The procedure I’m calling just updates a variable. But when it gets to the CloseWindow command, it apparently is trying to close all of the windows, not just the one I opened from the main window, hence the dialog about whether to Save, Revert, etc… I haven’t used this procedure in a few weeks, and it worked fine then, so it may be connected to the recent updates.


#10

… and now I can’t make it happen again.