IBM®
Skip to main content
    Country/region select      Terms of use
 
 
   
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

Versions 8.0 and later of Notes have a bug (SPR #AGUD7DSU3Q) where if there's a Queryclose event on a form, and the document is not "dirty," the Eclipse environment closes the document tab first, and only then does the Queryclose event run. This is too late to prevent the document from closing using Continue = False (though everything else the event might do works, as far as I know, because the document is still open in a hidden window "behind the scenes" until the C++-side code agrees that it's closed).

I'm working with the people involved to get a good fix, but in the meantime there's an interim fix you should know about for 8.5 and, I believe, 8.0.3 (check the release notes).  If you add a computed field (I think it can also be Computed for Display)  $HasAbortQueryClose with value "1", Eclipse will consider the window "dirty" and won't close it without first asking permission from core, which causes the Queryclose code to run.

I know, it's a pain in the nether regions, and it breaks existing applications. I don't like it any better than you do. At least the Design Element Search tool will let you quickly find all forms (and subforms, don't forget them. And pages) that contain Queryclose code.

The obvious question you may be thinking is, why wouldn't we just automatically do this for every window? This is what I asked.  The answer was that dirty windows are always brought to the front when you ask to close them and they aren't already in front (for instance when shutting down the client). Since this takes time to do, it's a performance bottleneck when shutting down the client, which is one of the things the client team was asked to optimize.  They felt they couldn't meet their target, if every window had to be activated when shutting down.

Andre Guirard | 3 November 2008 10:05:50 AM ET | Home, Plymouth, MN, USA | Comments (14)

Search this blog 

Disclaimer 

    About IBM Privacy Contact