The problem I am having is our users have multiple notes windows open (mailfile, other notes applications) and leave them open all day. They also have their preferences setup to check for new mail every 2 minutes (I tried to get them to change it to 15 but this is not acceptable).
When they are in a particular database and have a document open for more than 2 minutes, the back-end focus switches to their mail file and certain code fails in the other db because the code is trying to execute in their mail file.
Does anybody know of a way to switch focus back to the working db without opening a new instance of the working db? Supposedly, @Command([FileOpendatabase}) has an option for new instance but it opens a new instance regardless of the parameter passed -.
Has anybody else seen this issue or come up with a workaround?
An example of code that fails because its trying to execute in the user’s mail file (I have tried this in script as well - same issue):
ENVIRONMENT DocID := @Text(@DocumentUniqueID);
@If(@Command([FileSave]); @Command([FileCloseWindow]); @Return(“”));
ENVIRONMENT SaveOnly := “True”;
TmpDocID := @Environment(“DocID”);
ENVIRONMENT DocID := “”;
database := @Subset(@DbName; -1);
server := @Name([CN]; @Subset(@DbName; 1));
@PostedCommand( [OpenDocument] ; “0”; TmpDocID)
The code fails becuase its trying to open the document with the TmpDocID in the user’s mail file and the document does not exist in the mail file. Thanks for any feedback.
Subject: Window db Focus / tabs
Tom, I have to say that I don’t fully understand your problem. How is UI code executing in a tab that doesn’t have focus? Local agents?
It sounds like you have some power users there. Would it not be possible to disable the New Mail popup and instead, play a sound and/or show an icon in the System Tray? I’ve always found that popup too intrusive. New mail is also announced in the Status Bar. If this workaround isn’t acceptable, try to explain the problem differently, and I’d be happy to take another crack at helping you solve it.
Subject: RE: Window db Focus / tabs
Brent,Thanks for responding. It is kind of difficult to describe this issue.
In regards to your question:
How is UI code executing in a tab that doesn’t have focus?
Good question and that is my problem. When new mail arrives, the backend focus switches from the currently open document / database to the user’s mail file and trys to open another document that does not exist because focus has shifted to the user’s mail file (using @Command([openDocument]). The document is still open in the UI but I issue a fileclosewindow and it takes me back to the user’s mail file, not the database that original document came from.
All I am trying to do is close the UIDoc, save it and reopen it. If a user gets mail during this time, like I said the focus shifts back to the user’s mail file.
I am coding a workaround and have opened up a PMR with IBM. I will let them handle it from here. Thanks again for responding.
Subject: RE: Window db Focus / tabs
Well lotus support did not really help (go figure) - I am reposting this to see if anybody else has seen / coded a workaround.